many
Which one is your style? Spaces or tabs? 2 spaces or 4 spaces?
I'm forced to use 2 spaces but come on I just can't read the code with indentation of 2 spaces
Nils
Alex
also you use LoginStatus in another thread, but you already delete it
Alex
Asdew
Nils
Nils
thx
many
Then why do some people prefer two spaces?
Nils
Asdew
Please contact me in DMs.
Asdew
Nils
delete reinterpret_cast<void*>(1);
this should always segfault, right?
Dima
Alex
Anonymous
Alex
try to write to NULL address
Nils
solved, thx
Nils
But, does crashing one thread crash the entire process?
Alex
this is guaranteed I suppose
Asdew
I thought I DMed you?
Nils
Just got this weird message 🤔
Dima
/ban @Nani_999
Nils
Thx
Nils
Interesting 🤔
Anonymous
Nils
Ouch
Nils
Can I somehow see weather a specific scope was ever entered? Seems like I can't use stdout and such
Dima
that sounds like impossible
Dima
how come one bot could access your contacts
Nils
Dima
imagine clicking on stranger’s link
Dima
Asdew
It's a real Telegram bot, just a scam.
Asdew
It's even marked by Telegram as a scam.
Rohit
Actually i am just a beginner . So want to know how to learn from the beginning.
PO
Hi
PO
who can tell me how can I replace each second and third element of 2d array with zero?
Nils
But isn't it just one byte?
Nils
I mean a data race can't happen with just one byte?
Nils
Nils
Should I use that "atomic chat"?
Nils
Oh I thought some compiler thingy 😅
Nils
but yeah makes sense…
Nils
oh, atomic<char>
Nils
What does atomic mean?
Nils
Also can I try if it is the CPU cache by making it somehow flush into memory?
Alex
Nils
"well" defined? Doesn't sound like it can still be undefined behavior?
Nils
ah, thx
Nils
auto* loginStatus = new std::atomic<char>(0);
Okay?
Nils
Yes
Nils
but it's a pointer?
Nils
I mean new returns a pointer right?
Nils
Ah, okay.
Nils
Well… It's still deadlocking 😢
Anonymous
int *a = new int[10];
int *b = a +100;
Does have UB?
Nils
https://hastebin.com/jurovohuzo.cpp
Nils
but it's a pointer
Nils
np
Nils
How can I check if a thread was ever started?
Nils
I am not, that's why I am asking how to verify that
Nils
Can I log to clog?
Nils
What happens when such a thread segfaults?
Nils
Does that mean yes to my question?
Nils
or does that mean yes that's alright?
Nils
thx
Nils
alright…
Nils
turns out it's never executed
Nils
I think so…