Блог пользователя yeetholmes619

Автор yeetholmes619, история, 10 дней назад, По-английски

Hey I think I'm using my mac's clang llvm compiler to compile my code with the following flags :

g++ -std=c++20 -DDEBUG -DYEET -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all -fsanitize=float-divide-by-zero -fsanitize=float-cast-overflow -fno-sanitize=null -fno-sanitize=alignment $$$filename -o $$${filename%.*}

and when I compiled the following code : 291228049 and ran it against any test case of the problem 1398D - Colored Rectangles, I got the following :

Runtime Error

But as you can check out, the submission was accepted on Codeforces, which confuses me. How do I begin to understand what's going on?

Thanks for your help and let me know if you need any more information

Edit 1 : I tried to run with just the address sanitizer flag, and I still got a runtime error. Then I decided to remove all the sanitizers and I still got the error so I thought the "-DDEBUG" flag was the culprit and I was right :")

debug(dp) which was a 3-D std::array gave the error.

I'm still not sure why, but at least it's not a compiler issue, which would've been harder to debug, lol!

Thanks!

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

»
10 дней назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

Do not use multiple sanitizers at the same time, they may be incompatible. If I only run it though address sanitizer, there is no error, so might be false positive (at least for sample).

  • »
    »
    9 дней назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Hey turns out it was an issue with my debugging code, specifically — debug(dp) where dp was a 3D std::array. Not exactly sure why but its at least not a compiler issue :) Thanks for your help!

»
9 дней назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Auto comment: topic has been updated by yeetholmes619 (previous revision, new revision, compare).