all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Danny Milosavljevic <dannym@scratchpost.org>
To: Jan Nieuwenhuizen <janneke@gnu.org>
Cc: Vagrant Cascadian <vagrant@debian.org>,
	guix-devel@gnu.org, bug-mes@gnu.org
Subject: Re: Update on wip-arm-bootstrap
Date: Mon, 22 Feb 2021 18:09:51 +0100	[thread overview]
Message-ID: <20210222180951.70edf64d@scratchpost.org> (raw)
In-Reply-To: <87v9akljyi.fsf@gnu.org>

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

> Hmm, I'm not seeing this (I did see something like this before).  You
> *are* on
> 
>     e44b6b7eed squash! commencement: binutils-mesboot0: Support ARM.
> 
> right?

Yes, but your gcc-mesboot.sh hardcoded a specific (older) path.  Sorry.

With updated gcc-mesboot.sh I get:

Program terminated with signal SIGSEGV, Segmentation fault.
(gdb) bt
#0  _IO_setb (f=0x4, b=0x4b <error: Cannot access memory at address 0x4b>, eb=0x4c <error: Cannot access memory at address 0x4c>, a=0) at genops.c:387
#1  0x00008f1c in _IO_doallocbuf (fp=0x4) at genops.c:406
#2  0x0002409c in _IO_new_file_overflow (f=0x6cde0 <_IO_2_1_stdout_>, ch=0) at fileops.c:576
#3  0x000249b0 in _IO_new_file_xsputn (f=0x6cde0 <_IO_2_1_stdout_>, data=0xbecfd313, n=1) at fileops.c:962
#4  0x0001a09c in _IO_vfprintf (s=0x6cde0 <_IO_2_1_stdout_>, format=0xbecfd313 "2\224\323Ͼ\001", 
    ap=<error reading variable: Cannot access memory at address 0xbecfce5c>) at vfprintf.c:1523
#5  0x00008828 in printf (format=0x525f0 "%d\n") at printf.c:33
#6  0x00008214 in main (argc=<error reading variable: Cannot access memory at address 0xbecfd364>, 
    argv=<error reading variable: Cannot access memory at address 0xbecfd360>) at test.c:6

Looks like a NULL pointer for a FILE* ?  Or is gdb just weird?

glibc-2.2.5/libio/genops.c:

void
_IO_setb (f, b, eb, a)
     _IO_FILE *f;
      char *b;
     char *eb;
     int a;
{
  if (f->_IO_buf_base && !(f->_flags & _IO_USER_BUF)) <---------------- here
    FREE_BUF (f->_IO_buf_base, _IO_blen (f));
  f->_IO_buf_base = b;
  f->_IO_buf_end = eb;
  if (a)
    f->_flags &= ~_IO_USER_BUF;
  else
    f->_flags |= _IO_USER_BUF;
}

int
_IO_new_file_overflow (f, ch)
      _IO_FILE *f;
      int ch;
{
  if (f->_flags & _IO_NO_WRITES) /* SET ERROR */
    {
      f->_flags |= _IO_ERR_SEEN;
      __set_errno (EBADF);
      return EOF;
    }
  /* If currently reading or no buffer allocated. */
  if ((f->_flags & _IO_CURRENTLY_PUTTING) == 0 || f->_IO_write_base == 0)
    {
      /* Allocate a buffer if needed. */
      if (f->_IO_write_base == 0)
        {
          _IO_doallocbuf (f); <------------- here
          _IO_setg (f, f->_IO_buf_base, f->_IO_buf_base, f->_IO_buf_base);
        }

Maybe add some debugging statements there?  But printf is broken, so maybe
use write(2, "foo\n", 4) and similar.

(I'm not sure about just defining -D__ARM_EABI__=1 as you are doing--after all,
it entails further stack alignment requirements.  Maybe try


+++ glibc-2.2.5/sysdeps/unix/sysv/linux/arm/sysdep.h    2021-02-22 00:44:43.300906460 +0100
@@ -29,8 +29,8 @@
    of the kernel.  But these symbols do not follow the SYS_* syntax
    so we have to redefine the `SYS_ify' macro here.  */
 #undef SYS_ify
-#define SWI_BASE  (0x900000)
-#define SYS_ify(syscall_name)  (__NR_##syscall_name)
+#define SWI_BASE  (0x000000)
+#define SYS_ify(syscall_name)  (__NR_##syscall_name & 0x8fffff)


as a more minimal patch?  Not sure...)

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2021-02-22 17:15 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-13  9:25 Update on wip-arm-bootstrap Jan Nieuwenhuizen
2021-02-18 17:26 ` Ludovic Courtès
2021-02-21 18:17   ` Jan Nieuwenhuizen
2021-02-22  1:03     ` Danny Milosavljevic
2021-02-18 17:48 ` Vagrant Cascadian
2021-02-18 21:52   ` Jan Nieuwenhuizen
2021-02-19  4:23     ` Danny Milosavljevic
2021-02-19  6:17       ` Jan Nieuwenhuizen
2021-02-21 18:28         ` Jan Nieuwenhuizen
2021-02-22  1:03           ` Danny Milosavljevic
2021-02-22  1:50             ` Danny Milosavljevic
2021-02-22  6:01               ` Jan Nieuwenhuizen
2021-02-22 17:09                 ` Danny Milosavljevic [this message]
2021-02-22 17:34                   ` Danny Milosavljevic
2021-02-22  6:14             ` Jan Nieuwenhuizen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210222180951.70edf64d@scratchpost.org \
    --to=dannym@scratchpost.org \
    --cc=bug-mes@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=janneke@gnu.org \
    --cc=vagrant@debian.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.