hyperscan icon indicating copy to clipboard operation
hyperscan copied to clipboard

Question: clarify the usage of -fno-omit-frame-pointer

Open alexey-milovidov opened this issue 5 years ago • 2 comments

For amd64, -fno-omit-frame-pointer is set. https://github.com/intel/hyperscan/blame/master/CMakeLists.txt#L271

We have occasionally removed this flag from build and have hit the bug immediately: https://github.com/ClickHouse/ClickHouse/pull/11718 because asynchronous stack unwinding from roseRunProgram function started to lead to segfault.

I did not find any information about the reason why the flag -fno-omit-frame-pointer is required (there is no comments in your CMakeLists.txt file).

My hypothesis is the following:

It looks like that computed gotos in Hyperscan jumps into the code of different functions and back. And without saving frame pointer, unwinding cannot work.

Am I right?

alexey-milovidov avatar Jun 16 '20 21:06 alexey-milovidov

I think -fno-omit-frame-pointer is only set for debugging purpose. We don't know how to reproduce this issue and have't seen this before. Will it be possible for you to reproduce it with Hyperscan only and with the default CMake file within Hyperscan?

xiangwang1 avatar Jun 24 '20 02:06 xiangwang1

It is reproducing reliably, it's possible to make an isolated test case... will look when we have a time.

alexey-milovidov avatar Jun 24 '20 09:06 alexey-milovidov