Anonymous
Hi
void
Anonymous
Am new here
void
I can't find a reference to this bug there
Hussein
Windows docs dont talk about this issue
yeah because it isn’t really an issue since it cannot cause any binary exploits because obviously you don’t expect the kernel to give you malicious addresses and your program will crash anyway
void
void
windows don't guarantee the returned address on this scenario?
void
is there any note about this?
Gilded
Hussein
then the behaviour is the same on windows?
well this mentioned almost in any book and paper discussing this scenario
basically it would be an stupid approach to bother returning -1 for a program that is going to be killed anyway
Hussein
void
pavel
pavel
Generally if malloc can't allocate memory - something wrong in your system, and process will crush anyway
void
pavel
Almost all big projects have own memory manager
void
yep
pavel
Depends on your project you can implement object pools
Hussein
Ok, but is a common recomendation to check malloc's return.
I don't undenstand why this check is still recommended.
your process will be killed only if it consumed more than any other process but sometimes your process isn’t the one that should be killed (probably chrome processes should be killed😂)
then they may get killed and in your program mmap() will return -1 and malloc() will return 0 because the operating system had some trouble allocating memory for you at the time
also the kernel tries to resolve fragmentation in memory
so if you ask for large page than the available clean pages
mmap will fail and malloc will return 0
because the empty gaps in your memory is not large enough for the size of the memory page you requested
pavel
Or even batched memory allocator
Hussein
pavel
Usually it happen when you try to allocate big memory chunk, larger than fragmentation gaps
pavel
Or if you try to allocate memory from some device like GPU
void
void
then even if I have an address I will not be able to be sure that it is available
pavel
Of you're deal with large memory allocation in runtime you can check how much free ram available before allocation
void
void
thanks for the time, really
Sarmat
hello guys, how can i connect my c++ app to firebase? (google database), i found one guide in youtube, but it not worked for me. does anyone in this chat connect to firebase by c++? do you have code example?
pavel
Or can follow this way) https://devblogs.microsoft.com/oldnewthing/20180228-00/?p=98125
Hussein
wait how can you post links here?
last time I did it I got a warning
pavel
Idk, just post. Maybe some domain in white list
pavel
Or i will be reported later
Hussein
ok thanks
İbn
Write a program in C++ that defines a single array of 50 int positions, generates random numbers in this array, rotates the array elements left by 5, and prints every 5 elements in a row ??
pavel
Students..
İbn
Write the code for multiplying two 3*3 binary matrices.
_Where the condition for multiplying the two matrices is that the first has a size of (n*m), and the size of the second is (m*h),, and the result is (n*h) ?
pavel
Justin Amos Akplehe
Is it necessary to study core programming to become an ethical hacker?
pavel
Sure
Hussein
yes
İbn
pavel
Can you help ?
No, just not interesting. Usual homework for beginners
Anonymous
Anonymous
If you wanna someone else does your homework, why do you just study software-engineering?
The key is doing homework, so you’ll learn the subject.
Else… You’ll become a copycat.
pavel
Copycat at least must know how to compile something
Justin Amos Akplehe
What does it take to call one a c++ programmer?
Anonymous
Ster-Devs
İbn
Anonymous
C++
Oooh thought its C, i find it easier
İbn
Anonymous
İbn
No problem
Anonymous
Cool
줄리아 우지야노바
#markdown
\Device\NUL
but GNU libc dont guarrantee the address returned by malloc
That doesn't depend on libc. the man pages has no relation with it. (There are some libc function that following standard and some that don't, malloc and calloc are on ISO C)
malloc and calloc can fail and will return NULL, otherwise it's not following ISO C. they don't have any relation with specific OS or toolchain
\Device\NUL
Phlexy
Good evening
I'm Prince Samuel
A student
Phlexy
I'm looking forward to learn from hournable people like u all in this group
Phlexy
Please I have some questions which I will be glad if I can get the source codes 🙏
Prometheus
Phlexy
Not necessarily that
But I want someone to actually help me with my assignment 🙏🙏
\Device\NUL
Prometheus
Phlexy
Prometheus
Not yet please
So do some work on it and come back when you have some stuff done. We'll be happy to help with questions then.
Phlexy
Phlexy
I will do some digging into that and get back to u
Prometheus
Phlexy
Thank you
Prometheus
Justin Amos Akplehe
Prometheus
Which school?
The one where other people do your work for you lol
MRT
How can I rewrite the second 128 bits of a 256-bit data? for first 128 bit slot i use
or(and(w,not(0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)), and(0x0,0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF))
\Device\NUL
\Device\NUL
You can't actually delete / create data in computer terms, there are only 1 and 0.