Skip to content

Fix for sanitizer's initialization-order-fiasco - #891

Closed
heshpdx wants to merge 1 commit into
bbuchfink:masterfrom
heshpdx:master
Closed

Fix for sanitizer's initialization-order-fiasco#891
heshpdx wants to merge 1 commit into
bbuchfink:masterfrom
heshpdx:master

Conversation

@heshpdx

@heshpdx heshpdx commented Jul 29, 2025

Copy link
Copy Markdown
Contributor

Another fix related to #877. This one is in the construction of the matrices for blosum and pam. We fix the undefined behavior by creating static methods to construct on first use.

AddressSanitizer: initialization-order-fiasco src/basic/basic.cpp:281:16 in Reduction::Reduction(char const*)

located 3912 bytes inside of global variable 'Stats::blosum62' defined in 'src/stats/matrices/blosum62.cpp:25' of size 10344

Another fix related to bbuchfink#877. This one is in the construction
of the matrices for blosum and pam. We fix the undefined behavior
by creating static methods to construct on first use.

AddressSanitizer: initialization-order-fiasco src/basic/basic.cpp:281:16 in Reduction::Reduction(char const*)

located 3912 bytes inside of global variable 'Stats::blosum62' defined in 'src/stats/matrices/blosum62.cpp:25' of size 10344
@bbuchfink

Copy link
Copy Markdown
Owner

Sorry for the delay, important deadline.
I preferred to fix it by just putting that stuff into the same compilation unit: 410d4e5
No more initialization-order-fiascos showing up on my end.

@heshpdx

heshpdx commented Sep 10, 2025

Copy link
Copy Markdown
Contributor Author

Ok no problem. I'm going to keep this code for SPEC CPU since I know it already works, and we have passed Step 4. Thanks!

@heshpdx heshpdx closed this Sep 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants