Похожие чаты

Is accessing a member function through uninitialized pointer, UB ?

3 ответов

11 просмотров

if you cast it to null it isnt

the topic starts here @Minraws

depends on the kernel and the used compiler. in some implementations and with some configs there are auto initializations which leads to null pointer dereference and may segfault, if there is no such thing so it's ub because the pointer can be anything. when it's ub it can even be valid sometimes

Похожие вопросы

Обсуждают сегодня

Карта сайта