Commit f9ac2b4
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 and also adds a new CI
workflow to cover this `-ftrivial-auto-var-init` compilation mode.
Submitted by: Dmitrii Kuvaiskii <dimakuv amazon.de>
GitHub: closes #71
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1932662 13f79535-47bb-0310-9956-ffa450edef68-ftrivial-auto-var-init:1 parent e461da5 commit f9ac2b4
2 files changed
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
90 | 93 | | |
91 | 94 | | |
92 | 95 | | |
| |||
| 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