Commit 54ae6d1
committed
Fix teststr segfault when built with
* test/teststr.c -- one test case was broken and worked by accident: the
apr_strtok() function was intentionally called with `str == NULL` on
first invocation. This leads to an access to `*internal_state`, which is
technically undefined (uninitialized pointer on the stack).
Without `-ftrivial-auto-var-init`, the `*internal_state` is benign by
accident: the previous test case left the pointer-on-stack with some
reasonable address. However, with `-ftrivial-auto-var-init=zero`, the
`*internal_state` access fails because `internal_state = NULL`
(auto-initialized to zero). So the whole test segfaults.
This commit comments out this broken test case.-ftrivial-auto-var-init
1 parent e461da5 commit 54ae6d1
1 file changed
+6
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
51 | 55 | | |
52 | | - | |
| 56 | + | |
53 | 57 | | |
54 | 58 | | |
| 59 | + | |
55 | 60 | | |
56 | 61 | | |
57 | 62 | | |
| |||
0 commit comments