search for: mempci

Displaying 7 results from an estimated 7 matches for "mempci".

Did you mean: mempcy
2013 Jul 23
0
[LLVMdev] [Patch] WinCOFFObjectWriter: fix for storing pointer to string table in header name field
Is there a problem if the string is not null terminated? If not, you can snprintf it right into place instead of doing sprintf+mempcy. On Tue, Jul 23, 2013 at 12:29 PM, Paweł Bylica <pawel.bylica at ibs.org.pl>wrote: > Hi, > > Recently I was hit by an assert in WinCOFFObjectWriter that had forbidden > storing pointer to string table in header name field when the pointer had
2013 Jul 23
4
[LLVMdev] [Patch] WinCOFFObjectWriter: fix for storing pointer to string table in header name field
On 23.07.2013 18:43, Reid Kleckner wrote: > Is there a problem if the string is not null terminated? If not, you can > snprintf it right into place instead of doing sprintf+mempcy. snprintf always null-terminates (and truncates if there's not enough space). -Nico
2013 Jul 23
4
[LLVMdev] [Patch] WinCOFFObjectWriter: fix for storing pointer to string table in header name field
Hi, Recently I was hit by an assert in WinCOFFObjectWriter that had forbidden storing pointer to string table in header name field when the pointer had more that 6 decimal digits. This limit had been chosen to make implementation easier (sprintf adds null character at the end) and could be increased to 7 digits. My patch is attached. The implementation uses additional buffer on the stack to make
2013 Jul 23
1
[LLVMdev] [Patch] WinCOFFObjectWriter: fix for storing pointer to string table in header name field
In article <CACs=ty+7zKZU6Ad4jZ5J5Rb0qoMa-bNtO0f+xK_8SYfy3RyFbg at mail.gmail.com>, Reid Kleckner <rnk at google.com> writes: > Is there a problem if the string is not null terminated? If not, you can > snprintf it right into place instead of doing sprintf+mempcy. Am I the only one who scratches my head and says: sprintf? memcpy? Why are we using error-prone C APIs in
2013 Jul 23
1
[LLVMdev] Cutting down the number of platform checks
On Tue, Jul 23, 2013 at 5:53 PM, Óscar Fuentes <ofv at wanadoo.es> wrote: > Yes. What you are seeing are the platform checks, where the build system > looks for the presence of functions, headers, etc and then generates a > configuration file with that information. I've been meaning to cut down on the number of these because they are super slow and wasteful. Some of them are
2014 Nov 29
3
[LLVMdev] Frontend: How to use Member to Function Pointer as callbacks
Hello, As part of a MSIL (i.e. C#) to LLVM frontend I am currently working on ( https://github.com/xen2/SharpLang ), I would need some help/hint about how to properly design "PInvoke callbacks". Through "PInvoke" mechanism .NET allows you to call C functions, i.e.: C#: [DllImport("libc.so")] extern void mempcy(void* dest, void* src, int size); // declaration of C
2013 Jul 23
0
[LLVMdev] [Patch] WinCOFFObjectWriter: fix for storing pointer to string table in header name field
On Tue, Jul 23, 2013 at 12:48 PM, Nico Rieck <nico.rieck at gmail.com> wrote: > On 23.07.2013 18:43, Reid Kleckner wrote: > >> Is there a problem if the string is not null terminated? If not, you can >> snprintf it right into place instead of doing sprintf+mempcy. >> > > snprintf always null-terminates (and truncates if there's not enough > space).