compiler icon indicating copy to clipboard operation
compiler copied to clipboard

Crash with untagged enums

Open kristoisberg opened this issue 5 years ago • 3 comments

Issue description:

The compiler crashes (segfaults) when one untagged enum has a field that is named the same as another untagged enum.

Minimal complete verifiable example (MCVE):

enum _:test1 {}

enum _:test2 {
    test1
}

GDB Backtrace:

#0  0xf7f67efc in delete_consttable (table=0x1) at /root/pawn/source/compiler/sc1.c:5113
        cur = 0xf7f67ee7 <delete_consttable>
        next = 0x56568390
#1  0xf7f740bd in free_symbol (sym=0x565682f0) at /root/pawn/source/compiler/sc2.c:2905
        arg = 0x0
        __PRETTY_FUNCTION__ = "free_symbol"
#2  0xf7f743ca in delete_symbols (root=0x56566730, level=0, delete_labels=1, delete_functions=0) at /root/pawn/source/compiler/sc2.c:2992
        sym = 0x565682f0
        parent_sym = 0xf7f88176 <state_conflict>
        stateptr = 0x0
        mustdelete = 1
        __PRETTY_FUNCTION__ = "delete_symbols"
#3  0xf7f5b5f1 in pc_compile (argc=3, argv=0xffffdcb4) at /root/pawn/source/compiler/sc1.c:664
        entry = -134227632
        i = 0
        jmpcode = 0
        retcode = 1448448000
        incfname = "default.inc\000\030\035r\003,\334\375\367\065q\330\367OTUV\000\000\000\000\000\000\000\000E 4.4.59-87 `\323\200\202\f\333\377\367<\333\377\377\000\000\000\000\v\350\375\367\214RUV<\333\377\377\260\332\377\367\002\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\001\000\000\000P\331\377\367\220\367\374\367T\333\377\377P\333\377\377\000\000\000\000\000\320\377\367\000\000\000\000\270\016\330\367\bq\327\367\361SUVT\333\377\377.N=\366q\352\261\aP\333\377\377\324\333\377\377\377\377\377\377\000\000\000\000\020!\365\367\320\364\374\367\000\320\364\367\302\000\000\000\377\037\000\000\000\000\000\000\000\000\000\000I\332\340\367"...
        reportname = '\000' <repeats 80 times>, "\004\000\000\020\000\000\000\000Linux", '\000' <repeats 19 times>, "l\333\375\367C8\365\367\276SUV", '\000' <repeats 12 times>, ",\334\375\367A2\375\367\276SUV\000\000\000\000\000imperiaR\000\000\000\360\026\365\367`\323\200\202\320\364\374\367\315\337\375\367\001\000\000\000\001\000\000\000\020!\365\367R\000\000\000\020\065\365\367"...
        codepage = '\000' <repeats 12 times>
        binf = 0x565654c0
        inpfmark = 0xf7f9d464 <lastpos>
        lcl_packstr = 0
        lcl_needsemicolon = 0
        lcl_tabsize = 8
        hdrsize = 0
        ptr = 0xf7fa00e4 <binfname+4> ".amx"
        __PRETTY_FUNCTION__ = "pc_compile"
#4  0x565561c4 in ?? ()
No symbol table info available.
#5  0xf7d8db41 in __libc_start_main () from /lib/i386-linux-gnu/libc.so.6
No symbol table info available.
#6  0x56559000 in ?? ()
No symbol table info available.
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

Workspace Information:

  • Compiler version: 3.10.9
  • Command line arguments provided (or sampctl version): With(out) any arguments
  • Operating System: Windows 10, Debian 8

kristoisberg avatar Feb 01 '19 15:02 kristoisberg

This issue has been automatically marked as stale because it has not had recent activity.

stale[bot] avatar May 02 '19 16:05 stale[bot]

The problem has been fixed in #577, so we should probably close this issue. @pawn-lang @kristoisberg

Daniel-Cortez avatar Dec 31 '20 13:12 Daniel-Cortez

This issue has been automatically marked as stale because it has not had recent activity.

stale[bot] avatar Jun 22 '21 17:06 stale[bot]