AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

1999.12.10 14:20 "libtiff problem (fwd)", by Tom Kacvinsky
1999.12.10 15:34 "Re: libtiff problem (fwd)", by Tom Lane

1999.12.10 15:34 "Re: libtiff problem (fwd)", by Tom Lane

Han The Thanh <thanh@informatics.muni.cz> writes:

Dear libtiff developer(s),

I am using libtiff in an application for reading tiff images. When running the app with a memory checker, I got warnings (quite a lot) like:

From Checker (pid:17179): (apd) access permission denied in mapped memory. When Reading 168 byte(s) at address 0x4016a00a, inside the mmap zone. Base: 0x40172000, 0x4016a000 length: 0x00002000, 0xa800306c The region was mapped by:

        pc=0x08623991 in chkr_stub_mmap at
/home/thanh/src/checker/stubs/stubs-sys_mman.c:47
        pc=0x08355292 in _tiffMapProc at
/home/thanh/pdftex/src/libs/libtiff/tif_unix.c:81

Hmm. That sure looks to me like it is a trace of the library trying to access the TIFF file that it has just opened via mmap(). Are you sure the fault is not in your memory checker, ie it doesn't know that an mmap()'d file should not be considered uninitialized memory?

As far as I can tell from this backtrace, the checker is actually complaining about an access to the mapped region that happens *inside the mmap() syscall*, before the TIFF library has ever even been given the map region. So if you believe that the checker's complaint is valid, you must believe that mmap() itself is broken. I think it's probably the checker that's broken...

regards, tom lane