[compiler-rt] [win/asan] Ensure errno gets set correctly for strtol (PR #109258)
Charlie Barto via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 27 17:14:20 PDT 2024
barcharcraz wrote:
We fixed this internally in a similar (but somewhat more hacky) way.
For the errno issue it's actually a problem for mixed debug/release mode CRTs generally, and we've fixed a few instances of it by stamping out separate interceptors for each DLL.
One possible fix is to thunk through to an implementation that returns the right errno, or to one that takes the errno to update as a parameter.
Another idea is to have the static runtime thunk register errno upon startup and then have the interceptor figure out which one to update based on the return address or by walking the stack (we could enable frame pointers for the relevant code).
https://github.com/llvm/llvm-project/pull/109258
More information about the llvm-commits
mailing list