Похожие чаты

How do I definitely make my program fault?

13 ответов

9 просмотров

You mean crash?

Segfault?

Nils- Автор вопроса

int x= 1/0;

Nils- Автор вопроса
MrObjectOriented Ass
int x= 1/0;

I tried that too, program is still up and running just fine :-/

Nils
yeah

You can throw an exception and never catch it, or just call abort()

MrObjectOriented Ass
int x= 1/0;

I guess it's UB so it's not guaranteed to crash

Nils- Автор вопроса
Pavel
You can throw an exception and never catch it, or ...

abort() does not exist in my libc and exceptions that are not handled are ignored

Nils- Автор вопроса
Pavel
You can throw an exception and never catch it, or ...

exit() exists btw but simply causes a reboot

Nils
abort() does not exist in my libc and exceptions t...

What if try to raise SIGABRT or some other signal? https://en.cppreference.com/w/cpp/utility/program/raise

Nils- Автор вопроса
Pavel
What if try to raise SIGABRT or some other signal?...

Signals don't exist on that platform, I am not even sure if that thing runs an operating system 🤔

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

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

Hi everyone! I have a two-folded message to share today. First: updates and news, as we are being asked for those. We still want to go like we did the last 6 years: we w...
Marten | Unibright.io
31
комрады, че-та лыжы не едут var tmpFont: TFont; begin tmpFont:= TFont.Create; try case rgFontColor.ItemIndex of 0: tmpFont.Color:= clWindowText; 1: tmpFo...
Ed Doc
31
Интересно, нет ли какого-то способа получить из dll не адрес самой метки, а адрес со смещением?
The Bird of Hermes
54
generic procedure function test<T>(param: T); type case T of longint: NewT = word; longword: NewT = byte; end; var v1: NewT; Как это можно сделать? Чтобы у меня...
notme
21
Guys, mexc or gate.io (only exchanges with the token I need, unfortunately): depositing xmr, not withdrawing, is safe rn, or can fall for shotgun kyc? (I heard gate is alread...
another one bites the dust
20
The cynical view of ETFs in crypto is that it denotes the capture of the industry leading projects like Bitcoin by legacy/establishment infrastructure. A glass half full (or ...
ZecMec 21
1
Whoa, did you guys see this FUNToken Seed Grant announcement? 💸
Noah Noure
37
Делал задачу вот такую https://stepik.org/lesson/4985/step/9?unit=1083 получилось такое https://play.haskell.org/saved/ipKrepqe оно работает, тестов много не писал, но работае...
Fedor
22
hello guys, I have a laptop, if you connect wired headphones, the sound will come from the headphones and the built-in speakers AT THE SAME TIME. How can I make the sound com...
El Pepe
21
Всем привет, прошу совета по сложившейся ситуации: Windows приложение подключается к БД MySQL используя Firedac. При работе с версией MySQL 5.7 все отлично, но когда подключаю...
Constantine
6
Карта сайта