Skip to content

Support ASAN on Windows with MSVC #13703

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nielsdos opened this issue Mar 13, 2024 · 5 comments
Closed

Support ASAN on Windows with MSVC #13703

nielsdos opened this issue Mar 13, 2024 · 5 comments

Comments

@nielsdos
Copy link
Member

Description

Very nasty surprise: --enable-sanitizer silently doesn't do anything when using a VS toolchain on Windows instead of a Clang toolchain. I had to patch the configure script manually to add the necessary flags.

@iluuu1994
Copy link
Member

Did you get it to work? I tried back when we migrated from AppVeyor to GitHub, but I ran into various issues.

@nielsdos
Copy link
Member Author

I've used it to debug a mysqlnd Windows bug a few days ago and it works, but I don't run all extensions when debugging Windows bugs. I could imagine opcache issues but I haven't tried that yet.

@cmb69
Copy link
Member

cmb69 commented Jul 7, 2024

See #6964 for an unfinished attempt; maybe that can be somewhat helpful.

@iluuu1994
Copy link
Member

@cmb69 It's great to have you back! I don't remember the details (and the log is gone now) but I think the failures I referenced were the same ones you observed:

I'm getting a lot of 0xc0000028 (STATUS_BAD_STACK, i.e. "An invalid or unaligned stack was encountered during an unwind operation."), e.g. for Zend/tests/030.phpt. I think this is bogus, but I wouldn't know how to suppress it (note that this is from MSVC, not from ASan).

@nielsdos
Copy link
Member Author

nielsdos commented May 6, 2025

This has been fixed already

@nielsdos nielsdos closed this as completed May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants