Chris Lattner wrote:> On Sat, 6 May 2006, Reid Spencer wrote: >> Looks like Jeff Cohen already fixed this in CVS. Please update and give >> it another shot. > > Is this fixing the issue, or just papering over it? Why are we trying > to load an archive member without a path set?We're not. It's just a sentry value.> > -Chris > >> On Sat, 2006-05-06 at 16:43 -0400, Greg Pettyjohn wrote: >>> >>> On Sat, 6 May 2006, Greg Pettyjohn wrote: >>> >>>> Now I'm having problems with this: >>>> >>>> llvm-ar rc ./libgcc.a libgcc/./_muldi3.o >>>> <and-lots-more-.o-files...> >>>> C:\msys\1.0\home\llvm_home\install\bin\llvm-ar.exe: <invalid>: >>>> path is not valid >>>> >>> >>> I've tracked this down in the debugger. It is indeed a bug. The >>> problem is >>> that Path::isValid() will reject a string containing "<" and ">" on >>> Windows. >>> >>> Note that this is not the case on Unix -- compare the implementation of >>> Path::isValid() in .../Unix/Path.inc to the one in .../Win32/Path.inc. >>> >>> Probably the right place to make the fix is in >>> ArchiveMember::ArchiveMember() (Archive.cpp circa line 43). >>> >>> As per the comment this constructor is being used to make a "sentry >>> node" >>> in an ilist. In the initializations you will see `path("<invalid>")' >>> which >>> on Windows should be something else (perhaps just use >>> `path("--invalid--")'. >>> >>> I'm new to this list should I go ahead and write a bug? Or do you have >>> enough info here? >>> >>> Thanks. >>> >>> _______________________________________________ >>> LLVM Developers mailing list >>> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >> > > -Chris >
On Sat, 6 May 2006, Jeff Cohen wrote:>>> Looks like Jeff Cohen already fixed this in CVS. Please update and give >>> it another shot. >> >> Is this fixing the issue, or just papering over it? Why are we trying to >> load an archive member without a path set?> We're not. It's just a sentry value.Then why does it matter whether the path is legal or not? -Chris>>> On Sat, 2006-05-06 at 16:43 -0400, Greg Pettyjohn wrote: >>>> >>>> On Sat, 6 May 2006, Greg Pettyjohn wrote: >>>> >>>>> Now I'm having problems with this: >>>>> >>>>> llvm-ar rc ./libgcc.a libgcc/./_muldi3.o <and-lots-more-.o-files...> >>>>> C:\msys\1.0\home\llvm_home\install\bin\llvm-ar.exe: <invalid>: path is >>>>> not valid >>>>> >>>> >>>> I've tracked this down in the debugger. It is indeed a bug. The problem >>>> is >>>> that Path::isValid() will reject a string containing "<" and ">" on >>>> Windows. >>>> >>>> Note that this is not the case on Unix -- compare the implementation of >>>> Path::isValid() in .../Unix/Path.inc to the one in .../Win32/Path.inc. >>>> >>>> Probably the right place to make the fix is in >>>> ArchiveMember::ArchiveMember() (Archive.cpp circa line 43). >>>> >>>> As per the comment this constructor is being used to make a "sentry node" >>>> in an ilist. In the initializations you will see `path("<invalid>")' >>>> which >>>> on Windows should be something else (perhaps just use >>>> `path("--invalid--")'. >>>> >>>> I'm new to this list should I go ahead and write a bug? Or do you have >>>> enough info here? >>>> >>>> Thanks. >>>> >>>> _______________________________________________ >>>> LLVM Developers mailing list >>>> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >>> >> >> -Chris >> > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >-Chris -- http://nondot.org/sabre/ http://llvm.org/
The constructor for Path validates the path, period. It doesn't know or care whether the path is ever handed to the OS. An invariant for Path dictates that it always has a valid path. Chris Lattner wrote:> On Sat, 6 May 2006, Jeff Cohen wrote: >>>> Looks like Jeff Cohen already fixed this in CVS. Please update and >>>> give >>>> it another shot. >>> >>> Is this fixing the issue, or just papering over it? Why are we >>> trying to load an archive member without a path set? > >> We're not. It's just a sentry value. > > Then why does it matter whether the path is legal or not? > > -Chris > >>>> On Sat, 2006-05-06 at 16:43 -0400, Greg Pettyjohn wrote: >>>>> >>>>> On Sat, 6 May 2006, Greg Pettyjohn wrote: >>>>> >>>>>> Now I'm having problems with this: >>>>>> >>>>>> llvm-ar rc ./libgcc.a libgcc/./_muldi3.o >>>>>> <and-lots-more-.o-files...> >>>>>> C:\msys\1.0\home\llvm_home\install\bin\llvm-ar.exe: <invalid>: >>>>>> path is not valid >>>>>> >>>>> >>>>> I've tracked this down in the debugger. It is indeed a bug. The >>>>> problem is >>>>> that Path::isValid() will reject a string containing "<" and ">" on >>>>> Windows. >>>>> >>>>> Note that this is not the case on Unix -- compare the >>>>> implementation of >>>>> Path::isValid() in .../Unix/Path.inc to the one in >>>>> .../Win32/Path.inc. >>>>> >>>>> Probably the right place to make the fix is in >>>>> ArchiveMember::ArchiveMember() (Archive.cpp circa line 43). >>>>> >>>>> As per the comment this constructor is being used to make a >>>>> "sentry node" >>>>> in an ilist. In the initializations you will see >>>>> `path("<invalid>")' which >>>>> on Windows should be something else (perhaps just use >>>>> `path("--invalid--")'. >>>>> >>>>> I'm new to this list should I go ahead and write a bug? Or do you >>>>> have >>>>> enough info here? >>>>> >>>>> Thanks. >>>>> >>>>> _______________________________________________ >>>>> LLVM Developers mailing list >>>>> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >>>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >>>> >>> >>> -Chris >>> >> >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >> > > -Chris >