Record Case Detail

Notes

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

Stderr

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

Address 0x7fff7da86ac8 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
1 41 -117 -37 48 -62 -85 -78 72 -110 98 -82 -77 7 110 43 -115 80 88 -37 62 89 75 -110 80 -144 -4 94 137 14 -36 -48 -22 -75 135 -79 8 119 74 -152 -64 -126 -122 22 153 -69 9 -57 -160 -70 -120 39 17 -6 -39 -93 -80 40 31 -107 109 22 143 0 114 -94 -51 -59 14 187 -65 101 -51 129 0 67 -41 -55 -27 55 -33 -96 -147 102 -108 -15 -17 -31 84 42 -32 -15 -87 -75 119 29 71 122 25 41 25 132 67 62 -15 -17 67 -185 22 74 -141 18 -86 147 3 21 115 11 30 -6 76 173 19 31 84 22 -91 -5 38 -57 -59 -101 -32 -46 39 -186 69 91 -81 -83 -112 112 133 63 -171 -49 51 102 2 84 -34 121 -4 -148 140 19 -6 -106 -10 27 16 -63 182 -61 97 95 -104 -98 -4 -79 -13 -79 46 -17 -96 -94 124 -26 -67 -155 -30 -39 -23 -80 23 -46 -138 -47 10 25 -15 -22 45 149 -107 -44 83 -15 -11 16 89 -21 -15 39 -40 20 -133 -38 -44 8 22 28 95 170 66 -41 43 -95 35 72 -22 -43 90 -80 158 -68 -38 71 31 138 -71 18 -118 -34 -70 27 15 -2 6 -91 55 53 82 -65 1 167 73 -117 -3 -100 
132 6 50 -18 28 -43 -133 -106 -147 19 40 -28 -128 97 -51 -140 99 15 16 -120 3 -29 74 149 -38