Re: malloc(0) crashing with SIGABRT

2019-09-13 Thread Ken Brown
On 9/13/2019 3:38 AM, Petr Skočík wrote: > On 9/12/19 6:12 PM, Ken Brown wrote: >> gcc -Wall -o malloc_zero malloc_zero.c > > My apologies. It was my own stupid mistake. > > ( > I had > > gcc -include stdlib.h -xc - <<<'int main(){ }' && ./a.out; echo $? > > where I would normally run $aout

Re: malloc(0) crashing with SIGABRT

2019-09-12 Thread Brian Inglis
On 2019-09-11 23:18, Kaz Kylheku wrote: > On 2019-09-11 20:59, Brian Inglis wrote: >> On 2019-09-09 11:13, Petr Skočík wrote: >>> There's been a twitter discussion on how different POSIX platforms >>> handle malloc(0): https://twitter.com/sortiecat/status/1170697927804817412 . >>> >>> As for

Re: malloc(0) crashing with SIGABRT

2019-09-12 Thread Ken Brown
On 9/9/2019 1:13 PM, Petr Skočík wrote: > There's been a twitter discussion on how different POSIX platforms > handle malloc(0): https://twitter.com/sortiecat/status/1170697927804817412 . > > As for Cygwin, the answer appears to be "not well", but this should be > easy to fix. Can you show how

Re: malloc(0) crashing with SIGABRT

2019-09-11 Thread Kaz Kylheku
On 2019-09-11 20:59, Brian Inglis wrote: On 2019-09-09 11:13, Petr Skočík wrote: There's been a twitter discussion on how different POSIX platforms handle malloc(0): https://twitter.com/sortiecat/status/1170697927804817412 . As for Cygwin, the answer appears to be "not well", but this should

Re: malloc(0) crashing with SIGABRT

2019-09-11 Thread Brian Inglis
On 2019-09-09 11:13, Petr Skočík wrote: > There's been a twitter discussion on how different POSIX platforms > handle malloc(0): https://twitter.com/sortiecat/status/1170697927804817412 . > > As for Cygwin, the answer appears to be "not well", but this should be > easy to fix. POSIX SUS V4 2018

malloc(0) crashing with SIGABRT

2019-09-09 Thread Petr Skočík
There's been a twitter discussion on how different POSIX platforms handle malloc(0): https://twitter.com/sortiecat/status/1170697927804817412 . As for Cygwin, the answer appears to be "not well", but this should be easy to fix. Best regards, Petr Skocik -- Problem reports: