[LLVMdev] -f[no-]omit-frame-pointer

Alexander Potapenko glider at google.com
Thu Dec 29 11:02:46 PST 2011


On Thu, Dec 29, 2011 at 10:33 PM, Kostya Serebryany <kcc at google.com> wrote:
>
>
> On Wed, Dec 28, 2011 at 12:35 PM, Chandler Carruth <chandlerc at google.com>
> wrote:
>>
>> On Wed, Dec 28, 2011 at 2:06 AM, Anton Korobeynikov
>> <anton at korobeynikov.info> wrote:
>>>
>>> > I believe the best option for us is to add the
>>> > --fno-omit-frame-pointer depending on the -faddress-sanitizer flag.
>>> > But in order to do this reliably, we need to remove all the instances
>>> > of -fomit-frame-pointer from the command line.
>>> Why? Just add -fno-omit-frame-pointer last.
>>
>>
>> Yea, this should be easy to do inside the Clang driver. Feel free to CC me
>> on any patch, and send i to cfe-commits@
>
>
> One thing in favor of documenting the need for -fno-omit-frame-pointer
> instead of enforcing it in the driver:
> suppose a program, part of which is compiled with -faddress-sanitizer, but
> some other part is compiled w/o it.
> If -fno-omit-frame-pointer is implied by -faddress-sanitizer and not
> explicitly given by users, some part of the program will not have frame
> pointers and stacks will be short.
> I am inclined to document the need to -fno-omit-frame-pointer.
> Other opinions?
>
> --kcc
>
If some part of a program isn't compiled with -faddress-sanitizer, we
are likely to run into trouble if any of the uninstrumented
constructors call instrumented code. OTOH it is possibly legal to
dlopen a shared library that is not compiled with -faddress-sanitizer,
so it's a good idea to document this.




More information about the llvm-dev mailing list