search for: bufend

Displaying 16 results from an estimated 16 matches for "bufend".

2016 Nov 17
3
UB in MemoryBufferMMapFile
In MemoryBuffer::init, we have an assert that reads the memory at `BufEnd`, which is one past the end of some memory region: from lib/Support/MemoryBuffer.cpp:45: > void MemoryBuffer::init(const char *BufStart, const char *BufEnd, > bool RequiresNullTerminator) { > assert((!RequiresNullTerminator || BufEnd[0] == 0) && >...
2010 Sep 09
0
[LLVMdev] lib/Support/MemoryBuffer.cpp: wrong assert(BufEnd[0] == 0 && "Buffer is not null terminated!");
I believe this assert is wrong since it checks memory outside of the buffer. It shouldn't make assumptions on how callers store the array. Yuri
2014 Mar 19
2
[LLVMdev] load bytecode from string for jiting problem
...the source code of llvm. First, I change isRawBitcode function to print the content of the parameter like this: original: http://llvm.org/docs/doxygen/html/ReaderWriter_8h_source.html#l00081 inline bool isRawBitcode(const unsigned char *BufPtr, const unsigned char *BufEnd) { // These bytes sort of have a hidden message, but it's not in // little-endian this time, and it's a little redundant. errs()<< "isRawBitcode output:\n"; for (int i = 0; i < 4; i++) errs() << BufPtr[i] << "\n"; if (BufPtr !=...
2014 Mar 13
2
[LLVMdev] load bytecode from string for jiting problem
...le the compiled program is running, I try to read and parse this global variable for jiting the function. 1) I read the global variable with StringRef sr (gv, gv_length); 2) I manually test this bytecode by (inspired by inline bool isRawBitcode(const unsigned char *BufPtr, const unsigned char *BufEnd) at http://llvm.org/docs/doxygen/html/ReaderWriter_8h_source.html#l00067) if (sr.str()[0] == 'B') std::cout << "B ok\n"; if (sr.str()[1] == 'C') std::cout << "C ok\n"; if (sr.str()[2] == (char) 0xc0) std::cout << "0xc0 ok\...
2016 Nov 17
2
UB in MemoryBufferMMapFile
Chris Lattner <clattner at apple.com> writes: > On Nov 16, 2016, at 9:46 PM, Justin Bogner via llvm-dev > <llvm-dev at lists.llvm.org> wrote: >> In MemoryBuffer::init, we have an assert that reads the memory at >> `BufEnd`, which is one past the end of some memory region: >> >> from lib/Support/MemoryBuffer.cpp:45: >>> void MemoryBuffer::init(const char *BufStart, const char *BufEnd, >>> bool RequiresNullTerminator) { >>> assert((!RequiresNullTerminator...
2014 Mar 19
2
[LLVMdev] load bytecode from string for jiting problem
...t; > First, I change isRawBitcode function to print the content of the parameter like this: > original: http://llvm.org/docs/doxygen/html/ReaderWriter_8h_source.html#l00081 > > inline bool isRawBitcode(const unsigned char *BufPtr, > const unsigned char *BufEnd) { > // These bytes sort of have a hidden message, but it's not in > // little-endian this time, and it's a little redundant. > errs()<< "isRawBitcode output:\n"; > for (int i = 0; i < 4; i++) > errs() <<...
2014 Mar 20
2
[LLVMdev] load bytecode from string for jiting problem
...I change isRawBitcode function to print the content of the parameter like this: >> original: http://llvm.org/docs/doxygen/html/ReaderWriter_8h_source.html#l00081 >> >> inline bool isRawBitcode(const unsigned char *BufPtr, >> const unsigned char *BufEnd) { >> // These bytes sort of have a hidden message, but it's not in >> // little-endian this time, and it's a little redundant. >> errs()<< "isRawBitcode output:\n"; >> for (int i = 0; i < 4; i++) >>...
2014 Mar 20
2
[LLVMdev] load bytecode from string for jiting problem
...>> >>>> <http://llvm.org/docs/doxygen/html/ReaderWriter_8h_source. >>>> html#l00081> >>>> >>>> inline bool isRawBitcode(const unsigned char *BufPtr, >>>> const unsigned char *BufEnd) { >>>> // These bytes sort of have a hidden message, but it's not >>>> in >>>> // little-endian this time, and it's a little redundant. >>>> errs()<< "isRawBitcode output:\n"; >>...
2009 Sep 24
7
[LLVMdev] MemoryBuffer
I was writing something using MemoryBuffer, and while looking through its code I came across line 59: assert(BufEnd[0] == 0 && "Buffer is not null terminated!"); I am curious if the MemoryBuffer only supports non-binary, non-null embedded files, or if it supports binary as well. I do not see anything inherently not expecting binary files except for that one line, so I am curious as to the purp...
2014 Dec 19
2
[LLVMdev] [Patches][RFC] What to do about bitcode streaming.
Hi Rafael, Would you mind waiting for Derek to come back from vacation to discuss this? We do use this code and could improve how it's used and tested within LLVM. Derek is the best person to discuss this, he'll be back in mid-January. Thanks, JF On Fri, Dec 19, 2014 at 6:41 AM, Rafael EspĂ­ndola < rafael.espindola at gmail.com> wrote: > > > I CC'ed llvmdev to put a
2009 Sep 24
0
[LLVMdev] MemoryBuffer
On Thu, Sep 24, 2009 at 2:32 PM, Chris Lattner <clattner at apple.com> wrote: > > On Sep 24, 2009, at 1:23 PM, OvermindDL1 wrote: > >> I was writing something using MemoryBuffer, and while looking through >> its code I came across line 59: >> assert(BufEnd[0] == 0 && "Buffer is not null terminated!"); >> I am curious if the MemoryBuffer only supports non-binary, non-null >> embedded files, or if it supports binary as well. I do not see >> anything inherently not expecting binary files except for that one >>...
2014 Dec 19
2
[LLVMdev] [Patches][RFC] What to do about bitcode streaming.
...mm, didn't read too closely, but just looks different from what it used to do... + const uint8_t *OrigBufPtr = BufPtr; // If we have a wrapper header, parse it and ignore the non-bc file contents. // The magic number is 0x0B17C0DE stored in little endian. if (isBitcodeWrapper(BufPtr, BufEnd)) if (SkipBitcodeWrapperHeader(BufPtr, BufEnd, true)) return Error(BitcodeError::InvalidBitcodeWrapperHeader); //... - if (isBitcodeWrapper(buf, buf + 4)) { - const unsigned char *bitcodeStart = buf; - const unsigned char *bitcodeEnd = buf + 16; - SkipBitcodeWrapperHeader(bit...
2009 Sep 24
0
[LLVMdev] MemoryBuffer
...er at apple.com> >> wrote: >>> >>> On Sep 24, 2009, at 1:23 PM, OvermindDL1 wrote: >>> >>>> I was writing something using MemoryBuffer, and while looking >>>> through >>>> its code I came across line 59: >>>> assert(BufEnd[0] == 0 && "Buffer is not null terminated!"); >>>> I am curious if the MemoryBuffer only supports non-binary, non-null >>>> embedded files, or if it supports binary as well. I do not see >>>> anything inherently not expecting binary files excep...
2008 Jul 21
2
sftp needs a long time for sending a filelist
Hello all Im using sftp 1:4.7p1-8ubuntu1.2 in a batchjob Ive noticed that sftp needs a long time for sending a filelist. The timespan increases exponential if many files are on the remoteserver. for example "ls -la *.txt" needs 10 seconds for 2000 files but needs 50 seconds for 4000 files. For 150.000 Files i have to wait 15 minutes for example but the
2004 Aug 06
2
More libshout questions
Okay, I am using libshout to stream to a NullSoft Shoutcast server. I am using libmad and libmp3lame to do re-encoding on the fly. I am streaming to the server (currently) with shout_send_raw(). When I try to use shout_metadata_add(), I get a segfault in strdup(). Anyone have any ideas as to why? Everything else works fine, just not the metadata. Thanks In Advance, Deven --- >8 ----
2004 Aug 06
2
More libshout questions
...4, 0, 0, 6, 0...} mp3output = 0x8060918 "" errmsg = 0x8062b18 "" buffer = 0x8062f20 "" metadata = (shout_metadata_t *) 0x80555b8 encPtr = (lame_global_flags *) 0x8062920 retcode = 134550048 Stream = {buffer = 0x0, bufend = 0x0, skiplen = 0, sync = 0, freerate = 0, this_frame = 0x0, next_frame = 0x0, ---Type <return> to continue, or q <return> to quit--- ptr = {byte = 0x0, cache = 0, left = 8}, anc_ptr = {byte = 0x0, cache = 0, left = 8}, anc_bitlen = 0, main_data = 0x0, md_len = 0, options = 0, er...