• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Start thread T0.
2THR_START 0 0 0 0
3
4
5# Create two locks.
6LOCK_CREATE 0 ff0 7777 0
7LOCK_CREATE 0 ff1 7778 0
8
9
10# Start thread T1
11THR_START 1 0 0 0
12
13# Call few functions in T0
14RTN_CALL 0 ca000001 ca000002 0
15RTN_CALL 0 ca000002 ca000003 0
16
17# Call few functions in T1
18RTN_CALL 1 ca100001 ca100002 0
19RTN_CALL 1 ca100002 ca100003 0
20
21# Allocate 0xff bytes of memory in T0
22MALLOC 0 cdeffedc abcd0 ff
23
24# Malloc some more (unrelated)
25MALLOC 0 cdeffedc ccc ff
26MALLOC 0 cdeffedc cccccccc ff
27
28# Acquire lock 7777 in T0
29WRITER_LOCK 0 aa 7777 0
30
31# Write to 0xabcde in T0
32SBLOCK_ENTER 0 ca000003 0 0
33WRITE 0 aa008001 abcde 1
34
35# Acquire reader lock 7778 in T1
36READER_LOCK 1 bb 7778 0
37
38##############
39# Race here: #
40##############
41#
42# Read 0xabcde in T1
43READ 1 aa108001 abcde 1
44