]> granicus.if.org Git - zfs/commit
Excessively large stack frames detected.
authorBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 30 Jul 2009 04:18:48 +0000 (21:18 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 30 Jul 2009 04:18:48 +0000 (21:18 -0700)
commitee435f260c61d19765254b723740aaac7ff36da2
tree58841c9f769a1d64dba4ff65ec4e919b78173a3e
parent326bb586bd19fad935a674dc65d03965f9c70f1d
Excessively large stack frames detected.
The 2.6.30 kernel build systems sets -Wframe-larger-than=2048 which causes
a warning to be generated when an individual stack frame exceeds 2048.
This caught the spa_history_log() and dmu_objset_snapshot() functions
which declared a data structure on the stack which contained a char
array of MAXPATHLEN.  This in defined to be 4096 in the linux kernel
and I imagine it is quite large under Solaris as well.  Regardless, the
offending data structures were moved to the heap to correctly keep the
stack depth to a minimum.  We might consider setting this value even
lower to catch additional offenders because we are expecting deep stacks.
module/zfs/dmu_objset.c
module/zfs/spa_history.c