dtrip / skipfish

Automatically exported from code.google.com/p/skipfish
Apache License 2.0
0 stars 0 forks source link

OpenBSD compatibility patch #37

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Sorry for creating a new issue but that's the only way to attach a file
here. Skipfish compiles cleanly, not much tested in production.

Original issue reported on code.google.com by pawel.kr...@hush.com on 25 Mar 2010 at 11:18

Attachments:

GoogleCodeExporter commented 9 years ago
This will not work as expected:

#define ck_realloc      realloc

...since the whole point of ck_realloc() - and the only reason there is a 
dependency
on malloc_size() / malloc_usable_size() - is that the newly added space is 
always
memset to 0; realloc() does not bear this guarantee.

Also:

+       new = calloc(1, size);
+       memcpy(new, mem, size);

#define ck_strdup       strdup

Unlike the original wrappers, this does not seem to be doing any return value
checking, and will crash on OOM.

Original comment by lcam...@google.com on 25 Mar 2010 at 5:35

GoogleCodeExporter commented 9 years ago

Original comment by lcam...@gmail.com on 25 Mar 2010 at 5:36

GoogleCodeExporter commented 9 years ago
Merging bugs.

Original comment by lcam...@gmail.com on 26 Mar 2010 at 6:33