Skip to content

Test failures under GCC13&14 #233

@armintoepfer

Description

@armintoepfer

Thank you for your work on edlib. We've been using it over many years.

Today, I've tried compiling and testing edlib with GCC 13 and 14, but hit a wall. There seems to be a buffer overflow.

Reproduce:

meson setup build_fail --werror --buildtype debugoptimized -Db_sanitize=address,undefined -Db_lundef=true
ninja -C build_fail test

Error message:

1/3 hello           OK              0.04s
2/3 aligner         OK              0.04s
3/3 runTests        FAIL            9.14s   killed by signal 6 SIGABRT
>>> MESON_TEST_ITERATION=1 MALLOC_PERTURB_=145 UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 MSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 ASAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1 /git/edlib/build_fail/runTests
―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― ✀  ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
stderr:
../edlib/src/edlib.cpp:659:17: runtime error: load of address 0x50300003daf0 with insufficient space for an object of type 'int'
0x50300003daf0: note: pointer points here
 00 70 41 18  0a 00 00 00 be be be be  00 00 00 00 00 00 00 00  03 02 00 00 20 00 00 00  01 0b 00 00
              ^
    #0 0x42831d in myersCalcEditDistanceSemiGlobal ../edlib/src/edlib.cpp:659
    #1 0x42af77 in edlibAlign ../edlib/src/edlib.cpp:201
    #2 0x4039e8 in test12() ../test/runTests.cpp:435
    #3 0x404c0e in runTests() ../test/runTests.cpp:582
    #4 0x402b4f in main ../test/runTests.cpp:69
    #5 0x7ffffe7915cf in __libc_start_call_main (/lib64/libc.so.6+0x295cf) (BuildId: d78a44ae94f1d320342e0ff6c2315b2b589063f8)
    #6 0x7ffffe79167f in __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x2967f) (BuildId: d78a44ae94f1d320342e0ff6c2315b2b589063f8)
    #7 0x402c18  (/git/edlib/build_fail/runTests+0x402c18)

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../edlib/src/edlib.cpp:659:17 in
―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions