Opened 9 years ago

Closed 9 years ago

#5340 closed defect (invalid)

readlink having trouble with links within a path

Reported by: Kurt Schwehr Owned by: warmerdam
Priority: normal Milestone:
Component: default Version: unspecified
Severity: normal Keywords: vsi path symbolic link


I'm working with gdal 1.10.0. I don't have a way to test this with trunk or the tip of the 1.10 branch without a huge amount of effort.

I've got a test environment where there at lots of symbolic links in the path that is passed to gdal to read source:trunk/autotest/gdrivers/data/nonsquare.vrt The handling of the small.raw path is having trouble. I am seeing that the test works on ubuntu 12.04, but I'm getting a few characters of junk after the end of the path in the filenameBuffer variable. On an extern redhat based test env (that I can't really get to), it goes totally sideways and drops a 2/3rds of the back half of the path and then isn't even close to finding small.raw. The issue is happing in this call to readlink:


Disabling HAVE_READLINK lets the vrt open and fink small.raw.

Apologies for not being able to share the details of this test environment. It's possible that there is something wrong with the local implementation of readlink, but I'm guessing that there is an actual bug in gdal's vsi/cpl_path handling of long paths with multiple symbolic links.

I'm going to keep trying to figure out what is up, but if anyone has any thoughts, I'm all ears.

Change History (1)

comment:1 by Kurt Schwehr, 9 years ago

Resolution: invalid
Status: newclosed

Creating a directory full of test files by linking from other locations will foil the readlink strategy. I think the only solution is to disable readlink in this particular test environment.

Note: See TracTickets for help on using tickets.