Skip to content
This repository was archived by the owner on Dec 2, 2023. It is now read-only.
This repository was archived by the owner on Dec 2, 2023. It is now read-only.

Double free with String and itertools #26

@LunNova

Description

@LunNova

Example code here:

https://github.com/LunNova/scopes-learning/blob/b438933c1e14e9658f1fa3c357d501fadb7c0fd4/aoc/3.sc#L69

Scopes is freeing the String that gets (l as String)d in line 54.
Don't think should be an allocation here to free even so very confused.

(gdb) x /s 0x64863b0
0x64863b0: "jqHRNqRjqzjGDLGLrsFMfFZSrLrFZsSL"
^ this is the second line of sample-input

free() gets called on it
... continue
free() gets called again
crash

Both calls are under find-common-n line 54 according to backtrace

Further discussion happened on discord, didn't get anywhere useful.

Haven't worked out a proper mcve.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions