Commit 62676d0
setrlimit01.c: use a more reliable segfault
When compiled for Android, strcpying to the null pointer was being
optimized away as unreachable, so the segfault wasn't being thrown. Use
raise to throw the segfault instead of ub, since the test just needs the
signal.
Reviewed-by: Andrea Cervesato <andrea.cervesato@suse.com>
Signed-off-by: Edward Liaw <edliaw@google.com>1 parent de44d81 commit 62676d0
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
256 | 257 | | |
257 | 258 | | |
258 | 259 | | |
259 | | - | |
260 | | - | |
| 260 | + | |
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
| |||
0 commit comments