Re: bad code with gcc-4.3 and lzma-utils ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> to reproduce, just download lzma-4.32.7.tar.gz and do:
> tar xf lzma-4.32.7.tar.gz
> cd lzma-4.32.7
> CXXFLAGS=3D'-O1 -march=3D2.0 -g' ./configure
> make
> make check

Built as above.  I see a segv compressing InBuffer.o in build directory.

Program received signal SIGSEGV, Segmentation fault.
0x00024638 in NCompress::NLZMA::CEncoder::SetStreams (this=0x4158f000, 
    inStream=0x0, outStream=0x3, inSize=0x12, outSize=0x0)
    at ../../../../../../src/sdk/7zip/Compress/LZMA/LZMAEncoder.cpp:1251
1251	  RINOK(Create());

There is a problem with memory allocation in MyAlloc:

Breakpoint 2, MyAlloc (size=72355848) at ../../../src/sdk/Common/Alloc.cpp:24
24	  if (size == 0)

This fails:

(gdb) 
NBT4::CMatchFinderBinTree::Create (this=0x32100, historySize=8388608, 
    keepAddBufferBefore=<value optimized out>, 
    matchMaxLen=<value optimized out>, keepAddBufferAfter=419)
    at ../../../../../../src/sdk/7zip/Compress/LZMA/../LZ/BinTree/BinTreeMain.h:97
97	    if (_hash != 0)
(gdb) 
101	  return E_OUTOFMEMORY;

There isn't a check for out of memory at 1251, so segv.  Don't have time
now to look at memory allocation problem.

Dave
-- 
J. David Anglin                                  dave.anglin@xxxxxxxxxxxxxx
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)
--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux SoC]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux