Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.compilers > #987
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!usenet.blueworldhosting.com!feeder02.blueworldhosting.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!news.iecc.com!.POSTED!nerds-end |
|---|---|
| From | "news" <news@fx32.iad.highwinds-media.com> |
| Newsgroups | comp.compilers |
| Subject | Executing from dynamically allocated memory |
| Date | Sat, 12 Oct 2013 00:05:39 GMT |
| Organization | Compilers Central |
| Lines | 20 |
| Sender | johnl@iecc.com |
| Approved | comp.compilers@iecc.com |
| Message-ID | <13-10-004@comp.compilers> (permalink) |
| NNTP-Posting-Host | news.iecc.com |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | 7bit |
| X-Trace | leila.iecc.com 1381542889 48277 64.57.183.58 (12 Oct 2013 01:54:49 GMT) |
| X-Complaints-To | abuse@iecc.com |
| NNTP-Posting-Date | Sat, 12 Oct 2013 01:54:49 +0000 (UTC) |
| Keywords | architecture, comment |
| Posted-Date | 11 Oct 2013 21:54:49 EDT |
| X-submission-address | compilers@iecc.com |
| X-moderator-address | compilers-request@iecc.com |
| X-FAQ-and-archives | http://compilers.iecc.com |
| Xref | csiph.com comp.compilers:987 |
Show key headers only | View raw
In the past, I've malloc'd memory, written machine instructions into it, and called the function I built there. All this on a 32-bit intel instruction set, on a Debian system. This appears no longer too work. My program gives a segmentation fault. The debugger tells me that the segmentation fault occurs on the first instruction of the called function, a push %ebp residing in malloced memory. Now it was a year or three ago that this worked. Has Linux changed in this respect? Is there something new I have to do to allocate executable writable memory for this purpose? Or might there be something even weirder going on? -- hendrik [ Sounds like the NX bit. See http://en.wikipedia.org/wiki/NX_bit#Linux -John]
Back to comp.compilers | Previous | Next — Next in thread | Find similar
Executing from dynamically allocated memory "news" <news@fx32.iad.highwinds-media.com> - 2013-10-12 00:05 +0000 Re: Executing from dynamically allocated memory "James Harris" <james.harris.1@gmail.com> - 2013-10-12 10:10 +0100 Re: Executing from dynamically allocated memory Sébastien Fricker <sebastien.fricker@gmail.com> - 2013-10-12 11:52 +0200 Re: Executing from dynamically allocated memory chakaram@auth.gr - 2013-10-12 19:20 +0300 Re: Executing from dynamically allocated memory Alex McDonald <blog@rivadpm.com> - 2013-10-12 11:12 -0700 Re: Executing from dynamically allocated memory sandmann@cs.au.dk (Søren Sandmann) - 2013-10-12 20:58 +0200 Re: Executing from dynamically allocated memory Jens Kallup <jkallup@web.de> - 2013-10-13 10:44 +0200
csiph-web