DEGwer's blog

By DEGwer, 9 years ago, In English

I wrote Topcoder SRM 450 Div1 medium's solution and submitted and ran system test, I got segmentation fault on some case. I ran system test again and again, every time I ran it, segmentation fault appeared on different case on same solution. (Once I got RE on test 3, but another time I got AC on test 3, but I got RE on test 27... etc)

ryo_issy also say that he got same trouble on SRM573 Div1 medium...

What is happening?

 
 
 
 
  • Vote: I like it
  • +1
  • Vote: I do not like it

»
9 years ago, # |
  Vote: I like it +6 Vote: I do not like it

Delta003 and I have been solving some practice SRM and TCHS competitions and we also get segmentation fault on random test cases.

»
9 years ago, # |
  Vote: I like it +6 Vote: I do not like it
»
9 years ago, # |
  Vote: I like it +5 Vote: I do not like it

I've got a problem too. I get segmentation fault on both SRM573 Div2 easy and SRM573 Div2 medium on random cases. Something weird is happening.

»
9 years ago, # |
  Vote: I like it +6 Vote: I do not like it

I am getting the same error for SRM 413 Div2 Hard.

»
9 years ago, # |
  Vote: I like it +5 Vote: I do not like it

Yeah, they are complaining about the same thing on TopCoder forums. Seems like a system bug.

»
9 years ago, # |
  Vote: I like it +9 Vote: I do not like it

Its my fault (or segfault XD), sorry guys :/

»
9 years ago, # |
  Vote: I like it +1 Vote: I do not like it

Now this trouble has disappeared. Thank you!

»
18 months ago, # |
Rev. 3   Vote: I like it -119 Vote: I do not like it

I had the same problem in a contest in codechef. I reached out to them via mail, and apparently it was an array out of bounds. They said that array out of bounds in a C style array is not very strict and sometimes it goes undetected. And hence using vectors or std::array is a better option if you think there might be an array out of bounds

I tried to report it as a bug. Here is a bug report response

Here are the links to my answers

https://www.codechef.com/viewsolution/30545573 https://www.codechef.com/viewsolution/30545583

  • »
    »
    18 months ago, # ^ |
      Vote: I like it -9 Vote: I do not like it

    Why so many downvotes???

    • »
      »
      »
      18 months ago, # ^ |
        Vote: I like it +38 Vote: I do not like it
      1. Because you revived a 8-year-old blog to post this, and it's not completely related.
      2. Because a programming competition platform can't enforce what is not in the language (this time, array bounds checking).