Bug 26673 - The kernel backtrace dumper should not use stack array which may lead to compilation errors
Summary: The kernel backtrace dumper should not use stack array which may lead to comp...
Status: RESOLVED FIXED
Alias: None
Product: systemtap
Classification: Unclassified
Component: runtime (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Unassigned
URL:
Keywords:
: 25852 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-09-28 19:36 UTC by agentzh
Modified: 2020-09-28 21:13 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description agentzh 2020-09-28 19:36:55 UTC
Consider the following example when using a MAXBACKTRACE macro value larger than 60 and the kernel backtrace dumper in the stap runtime, it will lead to compilation errors due to the on-stack array "entries" in the function of the stap runt

```
$ /opt/stap/bin/stap -DMAXBACKTRACE=61 -e 'probe begin { print_backtrace() }'
In file included from /tmp/stapy7pTmc/stap_ec9093ee0dc3ecaa0481bbf9075a06bf_1049_src.c:79:
/opt/stap/share/systemtap/runtime/stack.c: In function ‘_stp_stack_print_fallback.isra.33.constprop’:
/opt/stap/share/systemtap/runtime/stack.c:235:1: error: the frame size of 520 bytes is larger than 512 bytes [-Werror=frame-larger-than=]
 }
 ^
cc1: all warnings being treated as errors
make[1]: *** [scripts/Makefile.build:276: /tmp/stapy7pTmc/stap_ec9093ee0dc3ecaa0481bbf9075a06bf_1049_src.o] Error 1
make: *** [Makefile:1581: _module_/tmp/stapy7pTmc] Error 2
WARNING: kbuild exited with status: 2
Pass 4: compilation failed.  [man error::pass4]
```
Comment 1 agentzh 2020-09-28 20:59:02 UTC
Fixed in commit 3674b8d35e26.
Comment 2 agentzh 2020-09-28 21:13:40 UTC
*** Bug 25852 has been marked as a duplicate of this bug. ***