Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: whoa! "Bus error: 10" from install during cross-build on macos!



At Wed, 3 Dec 2025 10:41:01 +0000 (UTC), Benny Siegert <bsiegert%netbsd.org@localhost> wrote:
Subject: Re: whoa!  "Bus error: 10" from install during cross-build on macos!
>
> On Tue, 2 Dec 2025, Greg A. Woods wrote:
>
> > Various people on the internets have reported various similar errors
> > with several different versions of macos.  One said:  ""Bus error: 10"
> > on MacOS means, from what I understand: cannot allocate memory."
>
> Not sure about the 10, but a Bus error on
> macOS can also be a null pointer
> dereference. macOS maps an invalid page at
> address 0, so any pointer in that page
> will trigger a bus error.

That make a lot more sense!

Of course I guess a null pointer could be the result of a memory
allocation failure, so some folks might attribute it to the allocation
failure in their case instead of the more direct null dereference.

I did not realize an invalid page reference would be a bus error instead
of the far more common SIGSEGV.  Interestingly I do see SIGSEGV from
other applications on macos occasionally -- e.g. some ongoing problems
since the most recent updates with the browser I use most (Vivaldi).

I think I just discovered the reason for the 10:

$ signo BUS
#define SIGBUS  10      /* bus error */

The SIGBUS doesn't seem to have generated a DiagnostiReports log, though
maybe that was because I had core dumps disabled at the time, and of
course the toolchain binaries don't have a built-in crash reporter.  I
do get reports from manual test signals now with core dumps enabled.


As an aside, searching for stuff about macos errors on the internets is
usually a lost cause -- there are so many naive people behaving like
ChatGPT with confident and authoritative sounding answers that are
completely fictional.  Macos support is a zoo of misinformation.

--
					Greg A. Woods <gwoods%acm.org@localhost>

Kelowna, BC     +1 250 762-7675           RoboHack <woods%robohack.ca@localhost>
Planix, Inc. <woods%planix.com@localhost>     Avoncote Farms <woods%avoncote.ca@localhost>

Attachment: pgpC5ZyQJgPSJ.pgp
Description: OpenPGP Digital Signature



Home | Main Index | Thread Index | Old Index