[PATCH] D149549: [compiler-rt][interception][win] Don't crash on unknown instructions

Alvin Wong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat May 13 01:58:54 PDT 2023


alvinhochun added a comment.

In D149549#4339015 <https://reviews.llvm.org/D149549#4339015>, @mstorsjo wrote:

> @alvinhochun managed to pinpoint and guess the differing issue.
>
> With WinSDK/UCRT 10.0.19041.0, linking fails, since references to `__stdio_common_vfprintf` pulls in `output.obj` from `libucrt.lib`, and this object file pulls in `wcstol` from `strtox.obj`, which then later triggers the duplicate definition.
>
> With `libucrt.lib` from WinSDK 10.0.22621.0, this no longer happens. But the test still failed, fulfilling the XFAIL, with the following error:
>
>   AddressSanitizer: CHECK failed: asan_rtl.cpp:387 "((!asan_init_is_running && "ASan init calls itself!")) != (0)" (0x0, 0x0) (tid=16328)
>       <empty stack>
>
> After this patch, this no longer triggers errors, and the test runs successfully. So the original XFAIL condition is dependent on WinSDK version, but there was a second error which made the XFAIL still seem to behave correctly, until after this change.
>
> I can't comment on the rest of whether it's expected that this error condition that previously aborted execution, now no longer triggers a failure.

Thanks for following up this lead. I don't know how the CHECK is triggered, my guess is when `__debugbreak()` is executed, some exception handlers in asan gets called with the breakpoint exception causing a nested asan init?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D149549/new/

https://reviews.llvm.org/D149549



More information about the llvm-commits mailing list