corinthia-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jan i <j...@apache.org>
Subject Re: More on the xmalloc project
Date Fri, 27 Feb 2015 07:49:03 GMT
On Thursday, February 26, 2015, Gabriela Gibson <gabriela.gibson@gmail.com>
wrote:

> Hi Peter, (and everyone else!)
>
> I read your JIRA comment, and that's an interesting thing with the missing
> headerfiles.  My build report[1] was OK so, maybe  different compilers take
> headers in a different order?
>
> Regards the clang build, should/could we have this as a regular build
> option in the CMake file?
>
> Another thing to notice was that my test had quite a lot of malloc 0 calls,
> so whatever is run there, maybe it could do with a check, or perhaps
> xmalloc should check for if (!size) ... ?


A simple if sounds correct, but it is legal so it should just return.

Funny side effect on my little embedded Linux kernel, free(0) leads to
process termination.


>
> The html file I downloaded and tested to get all those zeros was here:
>
>
> http://stackoverflow.com/questions/8880603/loop-through-array-of-strings-in-bash-script
>
> cmd I used to test was:
>
> ./bin/dfutil -normalize
>
> ~/cor2/incubator-corinthia/loop-through-array-of-strings-in-bash-script.html
>
> Towards the end, there's a heap of 0 allocations.
>
> G
>
> Ps.: Currently trying to figure out the best way of testing the mallocs in
> the WrapperTest.c file.  Will holler when/if I get stuck.


Should be quite easy, expand the array up at the top, and write the test
functions.

remark you can start dftest so it runs only platform test cases (faster).

rgds
jan i

>
> [1] My build report:
>
> make
> [  5%] Built target odf
> [  7%] Built target api
> [ 38%] Built target core
> Scanning dependencies of target platform
> [ 38%] Building C object
> DocFormats/platform/CMakeFiles/platform.dir/src/Wrapper.c.o
> [ 66%] Built target platform
> [ 67%] Built target unittest
> [ 96%] Built target ooxml
> [ 97%] Built target latex
> Linking C static library ../lib/libDocFormats.a
> [ 97%] Built target DocFormats
> Linking C executable ../../../bin/dftest
> [ 97%] Built target dftest
> Linking C executable ../../../bin/dfconvert
> [ 98%] Built target dfconvert
> Linking C executable ../../../bin/dfutil
> [100%] Built target dfutil
>
> --
> Visit my Coding Diary: http://gabriela-gibson.blogspot.com/
>


-- 
Sent from My iPad, sorry for any misspellings.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message