search for: allocatemappedmemori

Displaying 20 results from an estimated 22 matches for "allocatemappedmemori".

Did you mean: allocatemappedmemory
2020 Oct 02
2
Memory mapping assumptions in RuntimeDyld
Hi! Implementing the Memory::allocateMappedMemory() function on z/OS, I see a failure in the AArch64 COFF test case. The test case has 3 sections. For each section, Memory::allocateMappedMemory() is called to reserve memory. If the distance between the pointers gets too large, then the test case fails. It can be reliable produced with a distance of 1MB between the pointers. An easy way to
2012 Nov 16
2
[LLVMdev] mmap and vm_protect on ARM+Apple systems
Hi, Can anyone tell me something about mmap and vm_protect on ARM+Apple systems? I'm working on a new memory manager implementation for MCJIT and I want to replace calls to Memory::AllocateRWX with calls to Memory::allocateMappedMemory, possibly still with the RWX flags. However, looking at the Memory::AllocateRWX implementation I see that it's jumping through some hoops in the case
2012 Nov 16
0
[LLVMdev] mmap and vm_protect on ARM+Apple systems
Hi Andy, On Nov 16, 2012, at 1:56 PM, "Kaylor, Andrew" <andrew.kaylor at intel.com> wrote: > Hi, > > Can anyone tell me something about mmap and vm_protect on ARM+Apple systems? Some. :) > > I’m working on a new memory manager implementation for MCJIT and I want to replace calls to Memory::AllocateRWX with calls to Memory::allocateMappedMemory, possibly still
2012 Dec 04
2
[LLVMdev] [PATCH][Review request] MappedMemoryTest: Prevent tests from running if read flag is not set.
The attached patch prevents MappedMemoryTest.BasicWrite and MappedMemoryTest.MultipleWrite (both in unittests/Support/MemoryTest.cpp) from running if the correct protection flags for memory allocation are not set. Without this patch, the two tests fail when I run "make check-all" on a mips octeon board. The problem with the current code is that it allocates a block of memory without
2012 Nov 17
4
[LLVMdev] mmap and vm_protect on ARM+Apple systems
"ARM Darwin can't do this. Memory is never allowed to be both writable and executable at the same time." That seems very sensible. So do the JIT engines just not work there now? Currently both MCJIT and JIT are using AllocateRWX which on that platform mmap's the memory as RX, then vm_protect's it as RX+VM_PROT_COPY, then vm_protect's it as RW. My best guess is that
2013 May 08
2
[LLVMdev] TLS with MCJIT (an experimental patch)
Hi David, Following up on the problems we discussed yesterday on IRC regarding TLS with MCJIT, I've put together the attached experimental patch. This patch makes three changes: 1. SectionMemoryManager is changed to request memory below the 2GB boundary by default. 2. sys::Memory::allocateMappedMemory is changed to set the MAP_32BIT flag if the requested "near" block
2012 Dec 05
0
[LLVMdev] [PATCH][Review request] MappedMemoryTest: Prevent tests from running if read flag is not set.
Look good. -Andy From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Akira Hatanaka Sent: Tuesday, December 04, 2012 1:33 PM To: LLVM Developers Mailing List Subject: [LLVMdev] [PATCH][Review request] MappedMemoryTest: Prevent tests from running if read flag is not set. The attached patch prevents MappedMemoryTest.BasicWrite and
2012 Nov 27
0
[LLVMdev] mmap and vm_protect on ARM+Apple systems
On Nov 16, 2012, at 4:12 PM, "Kaylor, Andrew" <andrew.kaylor at intel.com> wrote: > “ARM Darwin can't do this. Memory is never allowed to be both writable and executable at the same time.” > > That seems very sensible. So do the JIT engines just not work there now? They work by allocating RW memory, then switching the permissions to RX before running any code
2013 May 09
2
[LLVMdev] TLS with MCJIT (an experimental patch)
Can you try it without the MAP_32BIT part? It won't be as reliable, but if the memory addresses it is asking for are available it could work. I agree that there are good reasons not to lock in on a single memory address, but I'm curious as to what other obstacles might be lurking behind the ones we know about. If the patch works when memory is loaded below 2GB then it would be possible
2013 May 09
0
[LLVMdev] TLS with MCJIT (an experimental patch)
Hi, Unfortunately, I can't compile this patch. MAP_32BIT is a Linuxism that doesn't work on FreeBSD (or OS X, or, as far as I can tell, anywhere except Linux). We can consider adding something similar to FreeBSD (although I'm hesitant to encourage anything that increases the determinism of the memory layout of JITed code, for security reasons), but it doesn't seem ideal.
2013 May 10
0
[LLVMdev] TLS with MCJIT (an experimental patch)
Without the MSP_32BIT part, I consistently hit this assertion: Assertion failed: ((Type == ELF::R_X86_64_32 && (Value <= UINT32_MAX)) || (Type == ELF::R_X86_64_32S && ((int64_t)Value <= INT32_MAX && (int64_t)Value >= INT32_MIN))), function resolveX86_64Relocation, file ../lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp, line 222. David On 9 May 2013, at
2013 May 15
0
[LLVMdev] TLS with MCJIT (an experimental patch)
Can you elaborate on why MCJIT TLS support needs code in the low 2 GB? What piece of data do you need to be reachable? It sounds like this was discussed on IRC, but I'm curious. Does the MCJIT even have the reachability problems of the old JIT? If you build an object file in memory, presumably you can measure it and then allocate +x memory for it all at once, instead of the old model of
2013 May 15
7
[LLVMdev] TLS with MCJIT (an experimental patch)
Hi David, I believe that assertion indicates that something didn't get loaded into the lower 2GB of address space. That is, the memory manager isn't allocating memory in that range. I'm sure there must be a way to allocate memory in that range on FreeBSD. The system loader has to do it, right? I just don't know what makes it happen. -Andy -----Original Message----- From: Dr
2013 Oct 22
0
[LLVMdev] Size limitations in MCJIT / ELF Dynamic Linker/ ELF codegen?
So it looks like 0x0A3600D1 is a good code address and there's no problem executing the code there, but 0x00BC7680 is a bad data address. Is that correct? If so, this is almost certainly a relocation problem. You just need to find a relocation that writes an entry (probably a relative offset) at 0x0A3600D1+the size of the instruction at that address. BTW, what I said before about not being
2013 Oct 22
2
[LLVMdev] Size limitations in MCJIT / ELF Dynamic Linker/ ELF codegen?
Yes, this is correct code address accessing bad data address. However, there is no other relocation before .text or near it. I'll send you the full debug printout, maybe you'll note something. The problem could be result of something else entirely else than the linker such as some library initialization code that by chance worked with smaller code but fails now. I need to debug and see
2013 Oct 23
3
[LLVMdev] Size limitations in MCJIT / ELF Dynamic Linker/ ELF codegen?
YES, this is the problem! The program work ok, even a 5x larger version works well. Clearly the _chkstk calls must be emitted with ELF target on Windows as well - why not? I'd like to make a patch and fix this right. I experimented with both changes and practically only the lib/Target/X86/X86ISelLowering.cpp fixes the problem. The other change lib/Target/X86/X86FrameLowering.cpp was not
2013 Oct 23
0
[LLVMdev] Size limitations in MCJIT / ELF Dynamic Linker/ ELF codegen?
Hi Yaron, If you're outputting ELF on Windows this sounds like an issue we ran into where __chkstk calls weren't being output in the assembly due to an explicit check for COFF output. Once stack allocations in a given function exceeded some amount we'd get exactly this kind of crash in the function initialization. If you take a look for isTargetCOFF() in
2013 Oct 23
2
[LLVMdev] Size limitations in MCJIT / ELF Dynamic Linker/ ELF codegen?
If it's a Windows-only thing the correct tests would be: if (NumBytes >= 4096 && STI.isOSWindows()) { and if (Subtarget->isTargetWindows()) where bool isOSWindows() const { return TargetTriple.isOSWindows(); } Yaron 2013/10/23 Andrew MacPherson <andrew.macp at gmail.com> > Glad that helped! As I understand it __chkstk is always required on > Windows
2013 Oct 23
0
[LLVMdev] Size limitations in MCJIT / ELF Dynamic Linker/ ELF codegen?
Glad that helped! As I understand it __chkstk is always required on Windows regardless of output type, I had meant to file a bug about this but had apparently forgotten to do so. I think the check needs to be that the target is Windows and ignore the output type, Linux and OSX don't use this. Cheers, Andrew On Wed, Oct 23, 2013 at 11:32 AM, Yaron Keren <yaron.keren at gmail.com>
2013 Oct 22
2
[LLVMdev] Size limitations in MCJIT / ELF Dynamic Linker/ ELF codegen?
Hi, Thanks for your ideas. Memory allocation already exceeds 2x64K in the "working" case so it's not the condition of allocating more than 64K. To be sure I had modified SectionMemoryManager::allocateSection to allocate four time the required memory but it did not trigger more crashes.I debugged through the allocation code including the Win32 code and it seems to work well. I have