Skip to content

Commit 702fbd8

Browse files
committed
Make morestack_unwind test work regardless of whether syscalls are patched for the first call or only for the second call
1 parent 739c0d9 commit 702fbd8

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

src/test/x86/morestack_unwind.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
#include "util.h"
44

5+
static void start_test(void) {
6+
int break_here = 1;
7+
(void)break_here;
8+
}
9+
510
static void breakpoint(void) {
611
int break_here = 1;
712
(void)break_here;
@@ -10,6 +15,8 @@ static void breakpoint(void) {
1015
int main(void) {
1116
// glibc write() might only be patched after the first time it is executed.
1217
atomic_puts("Ensure glibc write() is patched...");
18+
19+
start_test();
1320
// The test requires this write() be buffered:
1421
atomic_puts("EXIT-SUCCESS");
1522
breakpoint();

src/test/x86/morestack_unwind.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from util import *
22

3-
send_gdb('break main')
3+
send_gdb('break start_test')
44
expect_gdb('Breakpoint 1')
55
send_gdb('c')
66
expect_gdb('Breakpoint 1')

0 commit comments

Comments
 (0)