[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-xorriso] xorriso : FAILURE : Image size 2244690s exceeds free s
From: |
Thomas Schmitt |
Subject: |
Re: [Bug-xorriso] xorriso : FAILURE : Image size 2244690s exceeds free space on media -2036700157s |
Date: |
Fri, 19 Aug 2011 11:15:14 +0200 |
Hi,
all tests on my Solaris (AMD 64 bit hardware, 32 bit snv 134 OpenSolaris)
went well without visible memory waste
But valgrind found a suspect.
I forced the normal 2-step conversion to fail on Linux and ran
it under valgrind control.
==7178== Conditional jump or move depends on uninitialised value(s)
==7178== at 0x4F467F: str2ascii (util.c:458)
This points to the following statements:
ret_ = malloc(outbytes);
if (ret == NULL)
return ISO_OUT_OF_MEM;
The if-condition is missing an underscore. "ret" rather than "ret_".
This can cause false out-of-memory errors, although i do not get them
on Linux. (Local variable ret seems to be non-NULL by incident.)
This change silences the error messages of valgrind.
---------------------------------------------------------------------------
--- libisofs/util.c 2011-08-18 16:07:30.000000000 +0200
+++ libisofs/util.c 2011-08-19 11:01:32.000000000 +0200
@@ -416,6 +416,10 @@ int str2ascii(const char *icharset, cons
*/
conv_ret = 0;
result = str2wchar(icharset, input, &wsrc_);
+
+/* <<< Test for emulating the situation on Solaris */
+result= (int) ISO_CHARSET_CONV_ERROR;
+
if (result == (int) ISO_SUCCESS) {
src = (char *)wsrc_;
numchars = wcslen(wsrc_);
@@ -451,7 +455,7 @@ int str2ascii(const char *icharset, cons
loop_limit = inbytes + 3;
outbytes = (inbytes + 1) * sizeof(uint16_t);
ret_ = malloc(outbytes);
- if (ret == NULL)
+ if (ret_ == NULL)
return ISO_OUT_OF_MEM;
ret = ret_;
}
---------------------------------------------------------------------------
(The first four added lines are for simulating the situation.)
valgrind also reports a small memory leak. I will have a look at that,
although it is not related to the number of files, and thus not much
suspicious for the reported problem.
My plan is to upload a new xorriso-1.1.5.tar.gz today.
Have a nice day :)
Thomas