Skip to content

Undefine FORTIFY_SOURCE for longjmp#9224

Merged
alexcrichton merged 1 commit intobytecodealliance:mainfrom
rockwotj:patch-2
Sep 11, 2024
Merged

Undefine FORTIFY_SOURCE for longjmp#9224
alexcrichton merged 1 commit intobytecodealliance:mainfrom
rockwotj:patch-2

Conversation

@rockwotj
Copy link
Copy Markdown
Contributor

@rockwotj rockwotj commented Sep 11, 2024

See the comment in the source file, we can't have FORTIFY_SOURCE enabled for longjmp code, so undefine it.

See the source for longjmp_chk in glibc, this assertion is fired: https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/____longjmp_chk.c;hb=HEAD#l54

Here is a similar commit in glibc tests: https://sourceware.org/git/?p=glibc.git;a=commit;h=46432be2f1d4de962b51ca6b9f80fc37744be9f7

We're only hitting this now because we're properly propagating our C/C++ compiler flags to the C code that Wasmtime's build scripts are compiling.

@rockwotj rockwotj requested a review from a team as a code owner September 11, 2024 13:38
@rockwotj rockwotj requested review from alexcrichton and removed request for a team September 11, 2024 13:38
See the comment in the source file, we can't have FORTIFY_SOURCE enabled for longjmp code, so undefine it.

See the source for longjmp_chk in glibc, this assertion is fired: https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/____longjmp_chk.c;hb=HEAD#l54

Here is a similar commit in glibc tests: https://sourceware.org/git/?p=glibc.git;a=commit;h=46432be2f1d4de962b51ca6b9f80fc37744be9f7
Copy link
Copy Markdown
Member

@alexcrichton alexcrichton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this!

@alexcrichton alexcrichton added this pull request to the merge queue Sep 11, 2024
Merged via the queue into bytecodealliance:main with commit bc8b17a Sep 11, 2024
@rockwotj rockwotj deleted the patch-2 branch September 11, 2024 15:30
rockwotj added a commit to rockwotj/wasmtime that referenced this pull request Sep 13, 2024
See the comment in the source file, we can't have FORTIFY_SOURCE enabled for longjmp code, so undefine it.

See the source for longjmp_chk in glibc, this assertion is fired: https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/____longjmp_chk.c;hb=HEAD#l54

Here is a similar commit in glibc tests: https://sourceware.org/git/?p=glibc.git;a=commit;h=46432be2f1d4de962b51ca6b9f80fc37744be9f7
alexcrichton pushed a commit that referenced this pull request Sep 13, 2024
See the comment in the source file, we can't have FORTIFY_SOURCE enabled for longjmp code, so undefine it.

See the source for longjmp_chk in glibc, this assertion is fired: https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/____longjmp_chk.c;hb=HEAD#l54

Here is a similar commit in glibc tests: https://sourceware.org/git/?p=glibc.git;a=commit;h=46432be2f1d4de962b51ca6b9f80fc37744be9f7
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