public inbox for libffi-discuss@sourceware.org
 help / color / mirror / Atom feed
* Re: Bus Error while trying to run the ffi_closure example in the documentation...
@ 2012-01-09  3:06 Anthony Green
  0 siblings, 0 replies; 9+ messages in thread
From: Anthony Green @ 2012-01-09  3:06 UTC (permalink / raw)
  To: nathan, bobbyholley; +Cc: twall, libffi-discuss, green

[-- Attachment #1: Type: text/plain, Size: 734 bytes --]

Hey guys.. I'm currently enjoying Yosmite park.  I'll catch up on all of the email when I return next week.

Thanks,

AG


-----Original Message-----
From: Bobby Holley [bobbyholley@gmail.com]
Received: Sunday, 08 Jan 2012, 6:37pm
To: Nathan Rajlich [nathan@tootallnate.net]
CC: Timothy Wall [twall@users.sf.net]; libffi-discuss [libffi-discuss@sourceware.org]; green@moxielogic.com
Subject: Re: Bus Error while trying to run the ffi_closure example in the documentation...


> Omg Bobby you're a life saver! That patch did the trick. Thanks all
> for all the help! Consider my case solved :)

\o/

It would be nice to make sure it's solved for everyone else too ;-).
Anthony, is this patch on the radar for libffi?

Cheers,
-bholley

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Bus Error while trying to run the ffi_closure example in the documentation...
  2012-01-09  2:37           ` Bobby Holley
@ 2012-01-23 18:51             ` Anthony Green
  0 siblings, 0 replies; 9+ messages in thread
From: Anthony Green @ 2012-01-23 18:51 UTC (permalink / raw)
  To: Bobby Holley; +Cc: Nathan Rajlich, Timothy Wall, libffi-discuss

On Sun, Jan 8, 2012 at 9:36 PM, Bobby Holley <bobbyholley@gmail.com> wrote:
>> Omg Bobby you're a life saver! That patch did the trick. Thanks all
>> for all the help! Consider my case solved :)
>
> \o/
>
> It would be nice to make sure it's solved for everyone else too ;-).
> Anthony, is this patch on the radar for libffi?

There was a similar patch already in the git tree that will go out
with 3.0.11.   I'm going through the patch queue today to see if I can
a release candidate out for review soon.

Thanks,

Anthony Green


>
> Cheers,
> -bholley

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Bus Error while trying to run the ffi_closure example in the documentation...
  2012-01-08  8:58         ` Nathan Rajlich
@ 2012-01-09  2:37           ` Bobby Holley
  2012-01-23 18:51             ` Anthony Green
  0 siblings, 1 reply; 9+ messages in thread
From: Bobby Holley @ 2012-01-09  2:37 UTC (permalink / raw)
  To: Nathan Rajlich; +Cc: Timothy Wall, libffi-discuss, green

> Omg Bobby you're a life saver! That patch did the trick. Thanks all
> for all the help! Consider my case solved :)

\o/

It would be nice to make sure it's solved for everyone else too ;-).
Anthony, is this patch on the radar for libffi?

Cheers,
-bholley

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Bus Error while trying to run the ffi_closure example in the documentation...
  2012-01-08  6:28       ` Bobby Holley
@ 2012-01-08  8:58         ` Nathan Rajlich
  2012-01-09  2:37           ` Bobby Holley
  0 siblings, 1 reply; 9+ messages in thread
From: Nathan Rajlich @ 2012-01-08  8:58 UTC (permalink / raw)
  To: Bobby Holley; +Cc: Timothy Wall, libffi-discuss

Omg Bobby you're a life saver! That patch did the trick. Thanks all
for all the help! Consider my case solved :)

On Sat, Jan 7, 2012 at 10:27 PM, Bobby Holley <bobbyholley@gmail.com> wrote:
> This might be what you're after:
> https://bugzilla.mozilla.org/show_bug.cgi?id=682180
>
> I emailed the patch to one of the libffi lists a while back - not sure
> if it ever got merged in.
>
> Cheers,
> -bholley
>
> On Sat, Jan 7, 2012 at 12:52 PM, Timothy Wall <twall@users.sf.net> wrote:
>>
>> I'm using ffi_closure on OSX (not lion, though) amd64 target and it performs as expected for me.
>>
>> Have you run the testsuite?  there are ffi_closure tests in that.
>>
>> On Jan 7, 2012, at 3:28 PM, Nathan Rajlich wrote:
>>
>> > Ok so as a little update, the test program I linked to above work on
>> > my Windows XP VM and Ubuntu VMs, so it looks like this might be
>> > something with either the Darwin 64-bit support, or something with my
>> > configuration. If somebody else has an OS X setup and could compile
>> > the example above it would be really helpful. Thanks in advance!
>> >
>> > On Sat, Jan 7, 2012 at 12:14 PM, Nathan Rajlich <nathan@tootallnate.net> wrote:
>> >> Awww nobody? Well for easier reference, here's the source code used in
>> >> question: https://gist.github.com/1575877 . It's straight from the
>> >> libffi docs. Hopefully with the source here somebody else can try
>> >> compiling and letting me know the result. Thanks!
>> >>
>> >> On Fri, Jan 6, 2012 at 12:17 PM, Nathan Rajlich <nathan@tootallnate.net> wrote:
>> >>> Hey all,
>> >>>
>> >>> So I'm trying to run the ffi_closure example from the libffi
>> >>> documentation (the one that wraps fputs() ). When trying to run the
>> >>> program, I get a "Bus Error: 10" and the program crashes.
>> >>>
>> >>> This is on OS X 64-bit (Lion). Put through gdb, this is what I get:
>> >>>
>> >>> ∞ ~/node-ffi/deps (gyp) $ gdb --args ./out/Debug/test
>> >>> GNU gdb 6.3.50-20050815 (Apple version gdb-1705) (Fri Jul  1 10:50:06 UTC 2011)
>> >>> Copyright 2004 Free Software Foundation, Inc.
>> >>> GDB is free software, covered by the GNU General Public License, and you are
>> >>> welcome to change it and/or distribute copies of it under certain conditions.
>> >>> Type "show copying" to see the conditions.
>> >>> There is absolutely no warranty for GDB.  Type "show warranty" for details.
>> >>> This GDB was configured as "x86_64-apple-darwin"...Reading symbols for
>> >>> shared libraries ... done
>> >>>
>> >>> (gdb) run
>> >>> Starting program: /Users/nrajlich/node-ffi/deps/out/Debug/test
>> >>> Reading symbols for shared libraries ++......................... done
>> >>>
>> >>> Program received signal EXC_BAD_ACCESS, Could not access memory.
>> >>> Reason: KERN_PROTECTION_FAILURE at address: 0x0000000100100a20
>> >>> 0x0000000100100a20 in ?? ()
>> >>> (gdb) bt
>> >>> #0  0x0000000100100a20 in ?? ()
>> >>> #1  0x0000000100001424 in start ()
>> >>>
>> >>>
>> >>> Thanks for looking, any thoughts would be appreciated! Cheers!
>>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Bus Error while trying to run the ffi_closure example in the documentation...
  2012-01-07 20:53     ` Timothy Wall
@ 2012-01-08  6:28       ` Bobby Holley
  2012-01-08  8:58         ` Nathan Rajlich
  0 siblings, 1 reply; 9+ messages in thread
From: Bobby Holley @ 2012-01-08  6:28 UTC (permalink / raw)
  To: Timothy Wall; +Cc: Nathan Rajlich, libffi-discuss

This might be what you're after:
https://bugzilla.mozilla.org/show_bug.cgi?id=682180

I emailed the patch to one of the libffi lists a while back - not sure
if it ever got merged in.

Cheers,
-bholley

On Sat, Jan 7, 2012 at 12:52 PM, Timothy Wall <twall@users.sf.net> wrote:
>
> I'm using ffi_closure on OSX (not lion, though) amd64 target and it performs as expected for me.
>
> Have you run the testsuite?  there are ffi_closure tests in that.
>
> On Jan 7, 2012, at 3:28 PM, Nathan Rajlich wrote:
>
> > Ok so as a little update, the test program I linked to above work on
> > my Windows XP VM and Ubuntu VMs, so it looks like this might be
> > something with either the Darwin 64-bit support, or something with my
> > configuration. If somebody else has an OS X setup and could compile
> > the example above it would be really helpful. Thanks in advance!
> >
> > On Sat, Jan 7, 2012 at 12:14 PM, Nathan Rajlich <nathan@tootallnate.net> wrote:
> >> Awww nobody? Well for easier reference, here's the source code used in
> >> question: https://gist.github.com/1575877 . It's straight from the
> >> libffi docs. Hopefully with the source here somebody else can try
> >> compiling and letting me know the result. Thanks!
> >>
> >> On Fri, Jan 6, 2012 at 12:17 PM, Nathan Rajlich <nathan@tootallnate.net> wrote:
> >>> Hey all,
> >>>
> >>> So I'm trying to run the ffi_closure example from the libffi
> >>> documentation (the one that wraps fputs() ). When trying to run the
> >>> program, I get a "Bus Error: 10" and the program crashes.
> >>>
> >>> This is on OS X 64-bit (Lion). Put through gdb, this is what I get:
> >>>
> >>> ∞ ~/node-ffi/deps (gyp) $ gdb --args ./out/Debug/test
> >>> GNU gdb 6.3.50-20050815 (Apple version gdb-1705) (Fri Jul  1 10:50:06 UTC 2011)
> >>> Copyright 2004 Free Software Foundation, Inc.
> >>> GDB is free software, covered by the GNU General Public License, and you are
> >>> welcome to change it and/or distribute copies of it under certain conditions.
> >>> Type "show copying" to see the conditions.
> >>> There is absolutely no warranty for GDB.  Type "show warranty" for details.
> >>> This GDB was configured as "x86_64-apple-darwin"...Reading symbols for
> >>> shared libraries ... done
> >>>
> >>> (gdb) run
> >>> Starting program: /Users/nrajlich/node-ffi/deps/out/Debug/test
> >>> Reading symbols for shared libraries ++......................... done
> >>>
> >>> Program received signal EXC_BAD_ACCESS, Could not access memory.
> >>> Reason: KERN_PROTECTION_FAILURE at address: 0x0000000100100a20
> >>> 0x0000000100100a20 in ?? ()
> >>> (gdb) bt
> >>> #0  0x0000000100100a20 in ?? ()
> >>> #1  0x0000000100001424 in start ()
> >>>
> >>>
> >>> Thanks for looking, any thoughts would be appreciated! Cheers!
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Bus Error while trying to run the ffi_closure example in the documentation...
  2012-01-07 20:29   ` Nathan Rajlich
@ 2012-01-07 20:53     ` Timothy Wall
  2012-01-08  6:28       ` Bobby Holley
  0 siblings, 1 reply; 9+ messages in thread
From: Timothy Wall @ 2012-01-07 20:53 UTC (permalink / raw)
  To: Nathan Rajlich; +Cc: libffi-discuss

I'm using ffi_closure on OSX (not lion, though) amd64 target and it performs as expected for me.

Have you run the testsuite?  there are ffi_closure tests in that.

On Jan 7, 2012, at 3:28 PM, Nathan Rajlich wrote:

> Ok so as a little update, the test program I linked to above work on
> my Windows XP VM and Ubuntu VMs, so it looks like this might be
> something with either the Darwin 64-bit support, or something with my
> configuration. If somebody else has an OS X setup and could compile
> the example above it would be really helpful. Thanks in advance!
> 
> On Sat, Jan 7, 2012 at 12:14 PM, Nathan Rajlich <nathan@tootallnate.net> wrote:
>> Awww nobody? Well for easier reference, here's the source code used in
>> question: https://gist.github.com/1575877 . It's straight from the
>> libffi docs. Hopefully with the source here somebody else can try
>> compiling and letting me know the result. Thanks!
>> 
>> On Fri, Jan 6, 2012 at 12:17 PM, Nathan Rajlich <nathan@tootallnate.net> wrote:
>>> Hey all,
>>> 
>>> So I'm trying to run the ffi_closure example from the libffi
>>> documentation (the one that wraps fputs() ). When trying to run the
>>> program, I get a "Bus Error: 10" and the program crashes.
>>> 
>>> This is on OS X 64-bit (Lion). Put through gdb, this is what I get:
>>> 
>>> ∞ ~/node-ffi/deps (gyp) $ gdb --args ./out/Debug/test
>>> GNU gdb 6.3.50-20050815 (Apple version gdb-1705) (Fri Jul  1 10:50:06 UTC 2011)
>>> Copyright 2004 Free Software Foundation, Inc.
>>> GDB is free software, covered by the GNU General Public License, and you are
>>> welcome to change it and/or distribute copies of it under certain conditions.
>>> Type "show copying" to see the conditions.
>>> There is absolutely no warranty for GDB.  Type "show warranty" for details.
>>> This GDB was configured as "x86_64-apple-darwin"...Reading symbols for
>>> shared libraries ... done
>>> 
>>> (gdb) run
>>> Starting program: /Users/nrajlich/node-ffi/deps/out/Debug/test
>>> Reading symbols for shared libraries ++......................... done
>>> 
>>> Program received signal EXC_BAD_ACCESS, Could not access memory.
>>> Reason: KERN_PROTECTION_FAILURE at address: 0x0000000100100a20
>>> 0x0000000100100a20 in ?? ()
>>> (gdb) bt
>>> #0  0x0000000100100a20 in ?? ()
>>> #1  0x0000000100001424 in start ()
>>> 
>>> 
>>> Thanks for looking, any thoughts would be appreciated! Cheers!

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Bus Error while trying to run the ffi_closure example in the documentation...
  2012-01-07 20:14 ` Nathan Rajlich
@ 2012-01-07 20:29   ` Nathan Rajlich
  2012-01-07 20:53     ` Timothy Wall
  0 siblings, 1 reply; 9+ messages in thread
From: Nathan Rajlich @ 2012-01-07 20:29 UTC (permalink / raw)
  To: libffi-discuss

Ok so as a little update, the test program I linked to above work on
my Windows XP VM and Ubuntu VMs, so it looks like this might be
something with either the Darwin 64-bit support, or something with my
configuration. If somebody else has an OS X setup and could compile
the example above it would be really helpful. Thanks in advance!

On Sat, Jan 7, 2012 at 12:14 PM, Nathan Rajlich <nathan@tootallnate.net> wrote:
> Awww nobody? Well for easier reference, here's the source code used in
> question: https://gist.github.com/1575877 . It's straight from the
> libffi docs. Hopefully with the source here somebody else can try
> compiling and letting me know the result. Thanks!
>
> On Fri, Jan 6, 2012 at 12:17 PM, Nathan Rajlich <nathan@tootallnate.net> wrote:
>> Hey all,
>>
>> So I'm trying to run the ffi_closure example from the libffi
>> documentation (the one that wraps fputs() ). When trying to run the
>> program, I get a "Bus Error: 10" and the program crashes.
>>
>> This is on OS X 64-bit (Lion). Put through gdb, this is what I get:
>>
>> ∞ ~/node-ffi/deps (gyp) $ gdb --args ./out/Debug/test
>> GNU gdb 6.3.50-20050815 (Apple version gdb-1705) (Fri Jul  1 10:50:06 UTC 2011)
>> Copyright 2004 Free Software Foundation, Inc.
>> GDB is free software, covered by the GNU General Public License, and you are
>> welcome to change it and/or distribute copies of it under certain conditions.
>> Type "show copying" to see the conditions.
>> There is absolutely no warranty for GDB.  Type "show warranty" for details.
>> This GDB was configured as "x86_64-apple-darwin"...Reading symbols for
>> shared libraries ... done
>>
>> (gdb) run
>> Starting program: /Users/nrajlich/node-ffi/deps/out/Debug/test
>> Reading symbols for shared libraries ++......................... done
>>
>> Program received signal EXC_BAD_ACCESS, Could not access memory.
>> Reason: KERN_PROTECTION_FAILURE at address: 0x0000000100100a20
>> 0x0000000100100a20 in ?? ()
>> (gdb) bt
>> #0  0x0000000100100a20 in ?? ()
>> #1  0x0000000100001424 in start ()
>>
>>
>> Thanks for looking, any thoughts would be appreciated! Cheers!

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Bus Error while trying to run the ffi_closure example in the documentation...
  2012-01-06 20:18 Nathan Rajlich
@ 2012-01-07 20:14 ` Nathan Rajlich
  2012-01-07 20:29   ` Nathan Rajlich
  0 siblings, 1 reply; 9+ messages in thread
From: Nathan Rajlich @ 2012-01-07 20:14 UTC (permalink / raw)
  To: libffi-discuss

Awww nobody? Well for easier reference, here's the source code used in
question: https://gist.github.com/1575877 . It's straight from the
libffi docs. Hopefully with the source here somebody else can try
compiling and letting me know the result. Thanks!

On Fri, Jan 6, 2012 at 12:17 PM, Nathan Rajlich <nathan@tootallnate.net> wrote:
> Hey all,
>
> So I'm trying to run the ffi_closure example from the libffi
> documentation (the one that wraps fputs() ). When trying to run the
> program, I get a "Bus Error: 10" and the program crashes.
>
> This is on OS X 64-bit (Lion). Put through gdb, this is what I get:
>
> ∞ ~/node-ffi/deps (gyp) $ gdb --args ./out/Debug/test
> GNU gdb 6.3.50-20050815 (Apple version gdb-1705) (Fri Jul  1 10:50:06 UTC 2011)
> Copyright 2004 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for details.
> This GDB was configured as "x86_64-apple-darwin"...Reading symbols for
> shared libraries ... done
>
> (gdb) run
> Starting program: /Users/nrajlich/node-ffi/deps/out/Debug/test
> Reading symbols for shared libraries ++......................... done
>
> Program received signal EXC_BAD_ACCESS, Could not access memory.
> Reason: KERN_PROTECTION_FAILURE at address: 0x0000000100100a20
> 0x0000000100100a20 in ?? ()
> (gdb) bt
> #0  0x0000000100100a20 in ?? ()
> #1  0x0000000100001424 in start ()
>
>
> Thanks for looking, any thoughts would be appreciated! Cheers!

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Bus Error while trying to run the ffi_closure example in the documentation...
@ 2012-01-06 20:18 Nathan Rajlich
  2012-01-07 20:14 ` Nathan Rajlich
  0 siblings, 1 reply; 9+ messages in thread
From: Nathan Rajlich @ 2012-01-06 20:18 UTC (permalink / raw)
  To: libffi-discuss

Hey all,

So I'm trying to run the ffi_closure example from the libffi
documentation (the one that wraps fputs() ). When trying to run the
program, I get a "Bus Error: 10" and the program crashes.

This is on OS X 64-bit (Lion). Put through gdb, this is what I get:

∞ ~/node-ffi/deps (gyp) $ gdb --args ./out/Debug/test
GNU gdb 6.3.50-20050815 (Apple version gdb-1705) (Fri Jul  1 10:50:06 UTC 2011)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin"...Reading symbols for
shared libraries ... done

(gdb) run
Starting program: /Users/nrajlich/node-ffi/deps/out/Debug/test
Reading symbols for shared libraries ++......................... done

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x0000000100100a20
0x0000000100100a20 in ?? ()
(gdb) bt
#0  0x0000000100100a20 in ?? ()
#1  0x0000000100001424 in start ()


Thanks for looking, any thoughts would be appreciated! Cheers!

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-01-23 18:51 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-09  3:06 Bus Error while trying to run the ffi_closure example in the documentation Anthony Green
  -- strict thread matches above, loose matches on Subject: below --
2012-01-06 20:18 Nathan Rajlich
2012-01-07 20:14 ` Nathan Rajlich
2012-01-07 20:29   ` Nathan Rajlich
2012-01-07 20:53     ` Timothy Wall
2012-01-08  6:28       ` Bobby Holley
2012-01-08  8:58         ` Nathan Rajlich
2012-01-09  2:37           ` Bobby Holley
2012-01-23 18:51             ` Anthony Green

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).