Displaying 20 results from an estimated 28 matches for "archivewriter".
2005 Nov 23
0
[LLVMdev] llvm-ranlib: Bus Error in regressions + fix
...the "GNU.a" file in the current directory. It opens the
> archive and scans through all the members, printing out the first byte
> of each one. Then it truncates the file and repeats that experiment. It
> also causes a Bus Error.
>
> Essentially, this is what happens in ArchiveWriter.cpp:429. This bug
> will be triggered by any archive that has a native symbol table, since
> that member (foreignST) references data that was mmaped from the
> original file. All the other members are copied from the temporary
> archive, so they are not a problem.
The file gets cor...
2005 Nov 22
2
[LLVMdev] llvm-ranlib: Bus Error in regressions + fix
...hed.
That program needs the "GNU.a" file in the current directory. It opens
the archive and scans through all the members, printing out the first
byte of each one. Then it truncates the file and repeats that
experiment. It also causes a Bus Error.
Essentially, this is what happens in ArchiveWriter.cpp:429. This bug
will be triggered by any archive that has a native symbol table, since
that member (foreignST) references data that was mmaped from the
original file. All the other members are copied from the temporary
archive, so they are not a problem.
Evan Jones
-------------- next part...
2005 Nov 23
2
[LLVMdev] llvm-ranlib: Bus Error in regressions + fix
...file on that platform. To fix this, the original archive file must
> be closed before performing the move.
Yup. If you use the sys::Path class to do the "unlink" (removeFromDisk) then
the platform differences should be accounted for. Please don't put the direct
unlink call into ArchiveWriter.cpp.
>
> I've attached a patch that builds the temporary archive in a
> stringstream, then writes the temporary file and moves it into place. It
> fixes the bug on the old RedHat system.
Please test the performance of that on the large .a file in the regression
tests. I have m...
2005 Nov 23
0
[LLVMdev] llvm-ranlib: Bus Error in regressions + fix
...orm. To fix this, the
>> original archive file must be closed before performing the move.
> Yup. If you use the sys::Path class to do the "unlink"
> (removeFromDisk) then the platform differences should be accounted
> for. Please don't put the direct unlink call into ArchiveWriter.cpp.
So this comment means that I should attempt to theoretically support
Windows, and close the current archive file before updating it?
>> I've attached a patch that builds the temporary archive in a
>> stringstream, then writes the temporary file and moves it into place.
>...
2005 Nov 22
2
[LLVMdev] llvm-ranlib: Bus Error in regressions + fix
...9c9d0 in llvm::Archive::writeMember(llvm::ArchiveMember
const&, std::basic_ofstream<char, std::char_traits<char> >&, bool,
bool, bool) (
this=0x8356088, member=@0x8356180, ARFile=@0xbfffd630,
CreateSymbolTable=false, TruncateNames=false, ShouldCompress=false)
at ArchiveWriter.cpp:294
#5 0x0829d297 in llvm::Archive::writeToDisk(bool, bool, bool) (
this=0x8356088, CreateSymbolTable=true, TruncateNames=false,
Compress=false) at ArchiveWriter.cpp:439
#6 0x081a5618 in main (argc=2, argv=0xbfffd9b4) at llvm-ranlib.cpp:76
#7 0x42015574 in __libc_start_main () from...
2010 Oct 25
1
[LLVMdev] sprintf -> snprintf conversion
...)
@@ -63,7 +63,7 @@
#else
// Strange that this system doesn't even have strerror
// but, oh well, just use a generic message
- sprintf(buffer, "Error #%d", errnum);
+ snprintf(buffer, sizeof(buffer), "Error #%d", errnum);
#endif
return str;
}
Index: lib/Archive/ArchiveWriter.cpp
===================================================================
--- lib/Archive/ArchiveWriter.cpp (revision 117247)
+++ lib/Archive/ArchiveWriter.cpp (working copy)
@@ -82,16 +82,16 @@
// Set the permissions mode, uid and gid
hdr.init();
char buffer[32];
- sprintf(buffer, "%-...
2005 Apr 20
8
[LLVMdev] misc CVS patches
...id=543 can be closed.
As per Reid's comment, I'll leave it open until this issue is resolved:
3. Figure out why ThrowErrno isn't appending the standard operating
system error message that would tell us why the status couldn't be
obtained.
> >Finally, I applied your patch to ArchiveWriter with minor
> >modifications -- please see llvm-commits or the web archive.
>
> I didn't use get{u,g}id() because that's not portable - I think we
> need another abstraction in the System library for these.
Hmm, seems like it's available on the Unices that we support: Li...
2005 Apr 21
0
[LLVMdev] misc CVS patches
...obably the way to go.
Implemented as sys::Process::GetCurrentUserId() and
sys::Process::GetCurrentGroupId(). Both Unix and Win32 implementations
have been provided. Jeff, is there something more intelligent on Win32
that these methods could return (other than 65536)?.
I've also corrected the ArchiveWriter to use these methods when it is
defaulting the archive header.
Reid
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20050421/fe35e8cd/attachment.html>
-------------- next part --------------
A non-text atta...
2005 Nov 22
0
[LLVMdev] llvm-ranlib: Bus Error in regressions + fix
...rchive::writeMember(llvm::ArchiveMember const&,
> std::basic_ofstream<char, std::char_traits<char> >&, bool, bool, bool) (
> this=0x8356088, member=@0x8356180, ARFile=@0xbfffd630,
> CreateSymbolTable=false, TruncateNames=false, ShouldCompress=false)
> at ArchiveWriter.cpp:294
> #5 0x0829d297 in llvm::Archive::writeToDisk(bool, bool, bool) (
> this=0x8356088, CreateSymbolTable=true, TruncateNames=false,
> Compress=false) at ArchiveWriter.cpp:439
> #6 0x081a5618 in main (argc=2, argv=0xbfffd9b4) at llvm-ranlib.cpp:76
> #7 0x42015574 in __...
2006 May 07
2
[LLVMdev] The Next Win32 File System Problem
...at
C:/msys/1.0/home/llvm_home/llvm-build/../llvm/lib/System/Win32/Path.inc:686
#1 0x004871c3 in llvm::Archive::writeToDisk(bool, bool, bool)
(this=0x3d5110,
CreateSymbolTable=true, TruncateNames=false, Compress=false)
at
C:/msys/1.0/home/llvm_home/llvm-build/../llvm/lib/Bytecode/Archive/ArchiveWriter.cpp:461
#2 0x00403d4d in doReplaceOrInsert() ()
at
C:/msys/1.0/home/llvm_home/llvm-build/../llvm/tools/llvm-ar/llvm-ar.cpp:645
#3 0x004042b5 in main (argc=64, argv=0x3d4ca0)
at
C:/msys/1.0/home/llvm_home/llvm-build/../llvm/tools/llvm-ar/llvm-ar.cpp:704
(gdb)
So how to fix this?:
1. Thes...
2005 Jan 27
0
[LLVMdev] Building the llvm runtime: 'Can't destroy file: Theprocess cannot access the fi
...nd llvm-ar returns error code 2 (which means
an error exception was generated). We just need to find out why
Win32/Path.inc is throwing an exception on rename. Possibly the
temporary file has not been closed at the point of the rename.
See the logic in Archive::writeToDisk in
lib/Bytecode/Archive/ArchiveWriter.cpp for the details. The logic looks
correct to me. The Archive file is closed and then renamed.
Reid.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
U...
2005 Apr 20
3
[LLVMdev] misc CVS patches
...a file first before
calling access(), but that precludes that function being used on a
directory (which is a valid sys::Path object and could be queried for
being executable), so I think it's unnecessary. I also applied your
patch to ignore dangling symlinks.
Finally, I applied your patch to ArchiveWriter with minor modifications
-- please see llvm-commits or the web archive.
> P.S. are there any plans to remove trailing whitespace from the source
> files? - these cause noisy diffs and sometimes require much manual
> work.
Sure. Patches are accepted, but please separate formatting chang...
2020 Apr 23
7
Cannot build master
Hi,
Using master at b0a1c0b72c9c61f8b0a223e08f43498abb64f5e8, I cannot build
LLVM. I configured with:
CC=clang CXX=clang++ cmake -DCMAKE_INSTALL_PREFIX=$HOME/opt/llvm11-git \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_BUILD_LLVM_DYLIB=ON \
-DLLVM_LINK_LLVM_DYLIB=ON \
-DBUILD_SHARED_LIBS=OFF \
-DLLVM_ENABLE_EH=ON \
-DLLVM_ENABLE_RTTI=ON \
2006 May 07
0
[LLVMdev] The Next Win32 File System Problem
...vm_home/llvm-build/../llvm/lib/System/Win32/Path.inc:686
> #1 0x004871c3 in llvm::Archive::writeToDisk(bool, bool, bool)
> (this=0x3d5110,
> CreateSymbolTable=true, TruncateNames=false, Compress=false)
> at
> C:/msys/1.0/home/llvm_home/llvm-build/../llvm/lib/Bytecode/Archive/ArchiveWriter.cpp:461
> #2 0x00403d4d in doReplaceOrInsert() ()
> at
> C:/msys/1.0/home/llvm_home/llvm-build/../llvm/tools/llvm-ar/llvm-ar.cpp:645
> #3 0x004042b5 in main (argc=64, argv=0x3d4ca0)
> at
> C:/msys/1.0/home/llvm_home/llvm-build/../llvm/tools/llvm-ar/llvm-ar.cpp:704
> (...
2005 Nov 23
3
[LLVMdev] llvm-ranlib: Bus Error in regressions + fix
...r to scan over everything and build the symbol table, and then scan
> over everything again and build the final archive. This would avoid
> writing an extra copy out to disk, and it wouldn't be hard to do this.
Yup, that would work too. It would, however, require significant rework in
ArchiveWriter.cpp code.
>> Yup. If you use the sys::Path class to do the "unlink"
>> (removeFromDisk) then the platform differences should be accounted
>> for. Please don't put the direct unlink call into ArchiveWriter.cpp.
>
> So this comment means that I should attempt...
2005 Jan 27
2
[LLVMdev] Building the llvm runtime: 'Can't destroy file: Theprocess cannot access the fi
>From: Jeff Cohen Date: Wed, 26 Jan 2005 19:47:44 -0800
>
>Fixed.
Yes, now it isn't the path.
I've recorded this trace:
-------------------------
llvm[3]: Building Debug Bytecode Archive libc.bca
/bin/rm -f /C/projects/build/MinGW/llvm-4-1/Debug/lib/libc.bca
/C/projects/build/MinGW/llvm-4-1/Debug/bin/llvm-ar rcsf
/C/projects/build/MinGW/llvm-4-1/Debug/lib/libc.bca
2005 Jan 28
1
[LLVMdev] Building the llvm runtime: 'Can't destroy file: Theprocess cannot access the fi
...code 2 (which means
>an error exception was generated). We just need to find out why
>Win32/Path.inc is throwing an exception on rename. Possibly the
>temporary file has not been closed at the point of the rename.
>
>See the logic in Archive::writeToDisk in
>lib/Bytecode/Archive/ArchiveWriter.cpp for the details. The logic looks
>correct to me. The Archive file is closed and then renamed.
>
>Reid.
>
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>LLVM Developers mailing lis...
2005 Apr 21
0
[LLVMdev] misc CVS patches
...ode outside of lib/System
> >is deprecated. We set the values to 1000 by default because in
> >general the uid/gid doesn't matter in an archive and the 1000 value
> >gets you to a safe (non-root, non-system) value.
>
> I had thought so, but Misha started using these in ArchiveWriter.cpp.
Whoops. Mea culpa. After the lib/System/Unix patches, I was mentally
still in Unix-land (hence all my Unix references).
Thanks for fixing, Reid! :)
--
Misha Brukman :: http://misha.brukman.net :: http://llvm.cs.uiuc.edu
2005 Apr 21
0
[LLVMdev] misc CVS patches
...GetCurrentUserId() and
> > sys::Process::GetCurrentGroupId(). Both Unix and Win32 implementations
> > have been provided. Jeff, is there something more intelligent on Win32
> > that these methods could return (other than 65536)?.
> >
> > I've also corrected the ArchiveWriter to use these methods when it is
> > defaulting the archive header.
>
> What do you think about this updated patch ?
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://mail...
2005 Nov 23
2
[LLVMdev] llvm-ranlib: Bus Error in regressions + fix
...Spencer wrote:
> 1. What is the path name associated with TmpArchive? If its the same
> as the path name associated with archPath then that's a bug, probably
> introduced when Path::makeUnique is called from
> Path::createTemporaryFileOnDisk which is called from line 377 of
> ArchiveWriter.cpp.
This does not appear to be the problem. I excluded the lines from the
strace that created this temporary file. After line 377:
(gdb) p TmpArchive
$2 = {path = {static npos = 4294967295,
_M_dataplus = {<allocator<char>> = {<No data fields>},
_M_p = 0x835407c &qu...