#818: Fix allocation of array for 4D arrays in IOASCII --------------------+------------------------------------------------------- Reporter: knarf | Owner: Type: defect | Status: new Priority: minor | Milestone: ET_2012_05 Component: Cactus | Version: development version Keywords: | --------------------+------------------------------------------------------- (At least) one place in IOASCII assumes maxdim<=3 by only allocating 3 entries of an array but then writing maxdim entries. The thorn TestArrays tests 4D arrays in its testsuite and while this seems to work on 64bit machines, it gives a segfault on 32bit machines (plus valgrind complaining loudly). Allocating maxdim entries (like also done elsewhere in the file) solves this problem, as indicated in the attached patch.
#818: Fix allocation of array for 4D arrays in IOASCII ---------------------+------------------------------------------------------ Reporter: knarf | Owner: Type: defect | Status: review Priority: minor | Milestone: ET_2012_05 Component: Cactus | Version: development version Resolution: | Keywords: ---------------------+------------------------------------------------------ Changes (by knarf):
* status: new => review
#818: Fix allocation of array for 4D arrays in IOASCII ---------------------+------------------------------------------------------ Reporter: knarf | Owner: Type: defect | Status: review Priority: minor | Milestone: ET_2012_05 Component: Cactus | Version: development version Resolution: | Keywords: ---------------------+------------------------------------------------------
Comment (by rhaas):
Patch looks fine (the whole line of it) :-). And the extra memory consumption of 8 (4) bytes is negligible.
Please apply.
#818: Fix allocation of array for 4D arrays in IOASCII ---------------------+------------------------------------------------------ Reporter: knarf | Owner: Type: defect | Status: closed Priority: minor | Milestone: ET_2012_05 Component: Cactus | Version: development version Resolution: fixed | Keywords: ---------------------+------------------------------------------------------ Changes (by knarf):
* status: review => closed * resolution: => fixed
trac@lists.einsteintoolkit.org