Record Case Detail

Notes

This function is in beta test. Please help improve it in the issues here.

Stderr

=================================================================
==56300==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffdbd6c95c8 at pc 0x00000049955c bp 0x7ffdbd6c8a10 sp 0x7ffdbd6c81c0
READ of size 601 at 0x7ffdbd6c95c8 thread T0
    #0 0x49955b  (/out/package/ex4+0x49955b)
    #1 0x515426  (/out/package/ex4+0x515426)
    #2 0x514fe7  (/out/package/ex4+0x514fe7)
    #3 0x7f918e09db96  (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
    #4 0x41cab9  (/out/package/ex4+0x41cab9)

Address 0x7ffdbd6c95c8 is located in stack of thread T0 at offset 2760 in frame
    #0 0x5150ff  (/out/package/ex4+0x5150ff)

  This frame has 4 object(s):
    [32, 2032) 'matrix' (line 8)
    [2160, 2760) 'arow' (line 9)
    [2896, 3496) 'tmp' (line 14) <== Memory access at offset 2760 partially underflows this variable
    [3632, 1003632) 'result' (line 15)
HINT: this may be a false positive if your program uses some custom stack unwind mechanism or swapcontext
      (longjmp and C++ exceptions *are* supported)
SUMMARY: 

Hints

Your answer may be identical to the JOJ answer in the first several lines.

However, the main problem you meet now is Runtime Error. And the exit code of your program is 1, which should be 0.

Please double check your code to solve this problem and try again.

Your Answer


        

JOJ Answer

STDOUT START
-32 65 26 -39 -2 59 -35 -111 128 16 -31 63 -57 72 100 -16 31 70 170 80 9 -66 -147 -52 -88 -19 122 134 100 -38 34 -159 -96 47 40 -19 5 -72 25 -58 -61 -130 91 107 -51 85 65 95 -42 46 -56 -57 82 -75 74 9 75 -17 60 25 104 -134 10 70 63 -138 115 82 15 73 -42 103 -25 -76 -42 -144 13 14 -50 59 -96 89 -107 62 105 -48 -79 36 -133 -86 -90 72 74 -36 0 36 29 -116 32 -60 -41 -104 -70 56 59 31 10 -42 -121 54 24 -96 20 91 142 144 -8 25 57 -39 -14 -7 32 -139 -14 36 80 -132 8 -122 73 181 88 36 -13 143 -13 62 -123 -37 37 -76 -6 -54 115 116 -176 85 -40 -98 67 -39 14 95 -47 -5 1 -34 75 19 -163 -109 -17 -3 74 126 -119 58 80 -80 75 -120 -50 161 -42 3 -53 149 112 69 -115 112 -43 -1 34 46 126 -88 -31 98 -19 161 -51 -127 53 -88 21 79 20 60 74 107 20 68 6 -61 97 -50 46 -6 -27 -23 -8 108 -37 -77 -12 41 23 -152 41 123 -81 -3 58 35 -56 60 30 113 -36 -63 -60 1 -10 -145 6 21 -106 12 64 90 -148 -46 -125 -40 -80 84 169 0 -52 -88 24 -97 23 29 -19 -66 44 15 80 -96 40 -107 44 -113 7 96 -9 56 93 -15 72 -131 101 -110 57 -25 141 -110