momchil-velikov wrote:

> Apologies for still not being able to create a reproducible example I can 
> share but what I am seeing is the stack probe write overwriting the value at 
> the tip of the stack when I step debug execution:

Can you spot a place where the probe instruction is *not* immediately after a 
decrement of the stack (disregarding some random register-to-register 
arithmetic that may appear)?

If you can't (and you should not find such a case), perhaps some instruction 
writes below the `sp`? That would be against the AArch64.

Is redzone enabled (`--aarch64-redzone=true|false`) "? If it is on, can you 
check if it makes a difference if you disable it? 

> > All the stack probing should have already finished before the call to 
> > `malloc`.

> Only for the containing function, the functions which have their stack probes 
> inlined will be in the middle of the function which then results in this 
> null-deref.

The stack probes (except `alloca` ones)  are emitted by the 
PrologEpilogInsertion pass, which is very late in the pipeline.
I didn't think inlining could happen after that pass. Can you share yous 
compilation pipeline (`-- debug-pass=Structure`)?


https://github.com/llvm/llvm-project/pull/66524
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to