Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
なぜclang ++ / OSXの下で以下がsigsegvを引き起こさないのか興味があります:
int *p = (int*)0; cout << *p;
しかし、これは:
int *p = (int*)1; cout << *p;
クランのバージョンは 4.1 です
無効なポインターの逆参照は未定義の動作です。これは、sigsev が保証されているという意味ではありません。なんでも起こる可能性がある。