タグ

Cに関するhara_boonのブックマーク (2)

  • 江添亮のC++入門


     C++C++使C++C++C++C++C++使 C++XYYZC++
  • printfに4285個アスタリスクをつけるとclang++が死ぬ - Qiita

    def check(n) s = "*"*n f = open("test.cpp","w") f.puts <<EOS #include <cstdio> int main(){ (#{s}printf)("Hello World\\n"); } EOS f.close() return system("clang++ test.cpp") end check(ARGV[0].to_i) $ ruby check.rb 10000 clang: error: unable to execute command: Illegal instruction: 4 clang: error: clang frontend command failed due to signal (use -v to see invocation) Apple LLVM version 10.0.1 (clang

    printfに4285個アスタリスクをつけるとclang++が死ぬ - Qiita
  • 1