You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@apr.apache.org by bu...@apache.org on 2026/06/03 12:24:13 UTC
[Bug 70104] New: fix problem with -fhardened / -fauto-var-init
https://bz.apache.org/bugzilla/show_bug.cgi?id=70104
Bug ID: 70104
Summary: fix problem with -fhardened / -fauto-var-init
Product: APR
Version: HEAD
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P2
Component: APR test
Assignee: bugs@apr.apache.org
Reporter: marcus@jet.franken.de
Target Milestone: ---
Created attachment 40187
--> https://bz.apache.org/bugzilla/attachment.cgi?id=40187&action=edit
apr-fix-autoinit.patch
the teststr.c strtok testcase has this pattern:
for (curtc = 0; curtc < sizeof cases / sizeof cases[0]; curtc++) {
char *retval1, *retval2;
char *str1, *str2;
char *state;
The test assumes "state" persists over loop iterations.
Howver with -fhardened or -fvar-auto-init functioanltiy, each of those abvoe is
reinitializerd to 0 in each loop iteration.
Fix is to move state out of the loop.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org