Summary of experimental results so far: Environment:
* Ubuntu 24.04 (Noble) and GitHub Actions runners * Kernel 6.8.0-85-generic * GCC 13.3.0 * glibc 2.39 * SQLite 3.45.1 (Ubuntu source package) Findings: The segmentation fault can be reproduced reliably with the Ubuntu 3.45.1-1ubuntu2.5 package and with binaries built using dpkg-buildpackage. Manual builds of the same source with a plain “./configure && make” do not crash. The manually built binary (default amalgamation) and the official sqlite.org binary both work correctly. Manually built non-amalgamation binaries also appear to work correctly. Rebuilding through dpkg-buildpackage, even with different CFLAGS/LDFLAGS combinations, consistently produces crashing binaries. This includes builds with and without LTO and PIE flags. (https://github.com/frankslin/sqlite3-ubuntu-fix/actions/runs/19005277401) Therefore the failure does not appear to depend on those specific options alone. The dpkg-buildpackage environment automatically injects a large set of hardening and optimization flags, including -flto=auto, -fcf-protection, -fstack-protector-strong, -D_FORTIFY_SOURCE=3, -Wl,-z,relro, and others. These are not used when building manually. The crash occurs inside glibc’s __strlen_avx2_rtm, called from sqlite3DbStrDup during query preparation. The same code path is stable in manually built binaries. Rebuilding the package source in the same environment with the default upstream amalgamation build (no “--disable-amalgamation”) has not yet been fully tested under identical flags. Current status: At this point the segmentation fault only occurs in binaries built via the Ubuntu packaging toolchain. Manually built binaries from the same source, whether amalgamation or non-amalgamation, run normally. Investigation is continuing to determine which aspect of the dpkg-buildpackage environment or its injected build options triggers the problem. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2087772 Title: crash (segfault) in libsqlite3 running multi-join query To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/sqlite3/+bug/2087772/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
