Rabin Vincent
854d2b9753
dlmalloc: ensure gd is set for early alloc
...
Attempting to run the sandbox leads to a segfault, because some dynamic
libraries (outside of u-boot) attempt to use malloc() to allocate memory
before u-boot's gd variable is initialized.
Check for gd not being NULL in the SYS_MALLOC_F_LEN handling, so that
malloc() doesn't crash when called at this point.
$ gdb -q --args ./u-boot
(gdb) r
Program received signal SIGSEGV, Segmentation fault.
0x0000000000412b9b in malloc (bytes=bytes@entry=37) at common/dlmalloc.c:2184
2184 if (!(gd->flags & GD_FLG_RELOC)) {
(gdb) p gd
$1 = (gd_t *) 0x0
(gdb) bt
#0 0x0000000000412b9b in malloc (bytes=bytes@entry=37) at common/dlmalloc.c:2184
#1 0x00007ffff75bf8e1 in set_binding_values (domainname=0x7ffff11f4f12 "libgpg-error", dirnamep=0x7fffffffe168, codesetp=0x0)
at bindtextdom.c:228
#2 0x00007ffff75bfb4c in set_binding_values (codesetp=0x0, dirnamep=0x7fffffffe168, domainname=<optimized out>) at bindtextdom.c:350
#3 __bindtextdomain (domainname=<optimized out>, dirname=0x7ffff11f4f00 "/usr/share/locale") at bindtextdom.c:348
#4 0x00007ffff11eca17 in ?? () from /lib/x86_64-linux-gnu/libgpg-error.so.0
#5 0x00007ffff7dea9fa in call_init (l=<optimized out>, argc=argc@entry=1, argv=argv@entry=0x7fffffffe208,
env=env@entry=0x7fffffffe218) at dl-init.c:78
#6 0x00007ffff7deaae3 in call_init (env=0x7fffffffe218, argv=0x7fffffffe208, argc=1, l=<optimized out>) at dl-init.c:36
#7 _dl_init (main_map=0x7ffff7ffe1a8, argc=1, argv=0x7fffffffe208, env=0x7fffffffe218) at dl-init.c:126
#8 0x00007ffff7ddd1ca in _dl_start_user () from /lib64/ld-linux-x86-64.so.2
Signed-off-by: Rabin Vincent <rabin@rab.in >
Acked-by: Simon Glass <sjg@chromium.org >
2014-11-07 16:27:05 -05:00
..
2014-10-27 17:54:13 -04:00
2014-10-27 17:54:09 -04:00
2014-07-18 17:53:24 -04:00
2013-04-01 16:33:52 -04:00
2014-10-24 16:04:59 -04:00
2014-10-25 07:02:00 -04:00
2014-07-18 17:53:23 -04:00
2014-10-28 20:44:04 -06:00
2014-05-29 17:49:00 -04:00
2013-07-24 09:44:38 -04:00
2014-09-15 13:32:55 -04:00
2014-10-27 11:03:33 -04:00
2014-05-29 17:48:21 -04:00
2014-08-21 12:01:13 -04:00
2014-10-27 11:03:33 -04:00
2014-03-21 16:43:58 -04:00
2013-07-24 09:44:38 -04:00
2014-07-18 17:53:23 -04:00
2014-06-11 16:25:47 -04:00
2014-10-16 14:20:40 -07:00
2013-10-14 16:06:54 -04:00
2013-07-24 09:44:38 -04:00
2011-04-08 00:44:27 -04:00
2014-10-22 09:03:06 -06:00
2014-05-29 17:45:31 -04:00
2013-07-24 09:44:38 -04:00
2014-07-18 17:53:23 -04:00
2013-07-24 09:44:38 -04:00
2014-02-04 16:32:20 +01:00
2013-07-24 09:44:38 -04:00
2010-08-09 01:07:37 +02:00
2013-07-24 09:44:38 -04:00
2013-07-24 09:44:38 -04:00
2013-07-24 09:50:24 -04:00
2014-05-29 17:45:31 -04:00
2014-05-27 10:21:32 -04:00
2014-09-02 14:29:28 +02:00
2013-07-24 09:44:38 -04:00
2014-06-05 14:44:56 -04:00
2013-07-24 09:44:38 -04:00
2013-10-14 16:06:53 -04:00
2013-07-24 09:44:38 -04:00
2014-10-27 11:04:00 -04:00
2014-10-25 15:27:15 -04:00
2013-07-24 09:44:38 -04:00
2014-07-22 07:44:25 -04:00
2014-08-09 11:17:03 -04:00
2014-09-24 18:30:27 -04:00
2014-08-09 11:16:57 -04:00
2014-06-05 14:44:56 -04:00
2014-08-09 11:17:03 -04:00
2013-07-24 09:44:38 -04:00
2013-07-24 09:44:38 -04:00
2014-06-05 14:44:56 -04:00
2013-07-26 15:32:59 -04:00
2014-08-09 11:16:57 -04:00
2014-05-23 11:53:05 +03:00
2013-07-24 09:44:38 -04:00
2014-10-26 14:03:08 -04:00
2014-04-02 16:36:06 -04:00
2013-07-24 09:44:38 -04:00
2013-07-24 09:44:38 -04:00
2014-07-18 17:53:23 -04:00
2014-07-22 07:44:26 -04:00
2014-03-07 10:59:06 -05:00
2013-08-19 15:45:35 -04:00
2014-10-27 17:54:09 -04:00
2014-06-20 11:54:29 -06:00
2013-10-14 16:06:53 -04:00
2014-06-05 14:38:38 -04:00
2013-07-24 09:44:38 -04:00
2011-04-08 00:44:27 -04:00
2013-10-14 16:06:53 -04:00
2013-07-24 09:44:38 -04:00
2013-08-16 13:45:15 -04:00
2014-07-23 14:07:23 +01:00
2014-03-22 14:47:22 -06:00
2013-07-24 09:44:38 -04:00
2014-06-19 11:19:07 -04:00
2013-11-22 16:50:52 -06:00
2014-10-27 17:54:12 -04:00
2013-10-16 09:24:38 -04:00
2014-07-18 17:53:24 -04:00
2013-07-24 09:44:38 -04:00
2014-03-24 12:58:56 +02:00
2014-10-03 17:26:50 +03:00
2013-07-24 09:44:38 -04:00
2014-09-15 13:32:55 -04:00
2014-09-24 18:30:29 -04:00
2013-07-24 09:44:38 -04:00
2014-07-22 07:44:26 -04:00
2013-05-31 17:12:03 -05:00
2014-05-23 11:53:05 +03:00
2014-07-18 17:53:23 -04:00
2014-05-29 17:49:00 -04:00
2013-07-24 09:44:38 -04:00
2013-07-24 09:44:38 -04:00
2014-10-10 09:44:21 -04:00
2012-12-11 13:17:33 -07:00
2013-07-24 09:44:38 -04:00
2013-11-08 15:25:13 -05:00
2014-06-23 15:37:23 -06:00
2013-07-24 09:44:38 -04:00
2014-10-27 11:04:01 -04:00
2013-10-14 16:06:53 -04:00
2014-10-22 10:36:50 -06:00
2014-06-19 11:19:04 -04:00
2013-05-13 16:26:12 +08:00
2013-07-24 09:44:38 -04:00
2014-07-18 17:53:23 -04:00
2014-10-22 10:36:47 -06:00
2010-08-09 01:07:37 +02:00
2013-07-24 09:44:38 -04:00
2012-03-06 21:09:46 +01:00
2013-07-24 09:44:38 -04:00
2014-02-19 09:47:34 -05:00
2014-08-09 11:17:00 -04:00
2014-05-12 15:19:46 -04:00
2013-07-24 09:44:38 -04:00
2013-07-24 09:44:38 -04:00
2013-10-14 16:06:53 -04:00
2014-08-25 19:25:55 -04:00
2014-08-25 19:25:55 -04:00
2013-10-14 16:06:53 -04:00
2013-07-24 09:44:38 -04:00
2014-05-08 10:38:29 +02:00
2014-10-06 14:50:43 +02:00
2013-07-24 09:44:38 -04:00
2014-06-05 14:44:56 -04:00
2012-08-09 23:39:18 +02:00
2013-11-08 15:25:13 -05:00
2013-07-24 09:44:38 -04:00
2014-10-27 17:54:12 -04:00
2014-10-25 07:27:37 -04:00
2014-10-22 10:36:53 -06:00
2014-04-22 17:58:48 -07:00
2014-11-07 16:27:05 -05:00
2013-04-01 16:33:52 -04:00
2013-07-24 09:44:38 -04:00
2013-07-24 09:44:38 -04:00
2014-01-14 09:01:06 -05:00
2014-07-22 07:44:26 -04:00
2014-03-21 16:43:59 -04:00
2014-06-05 14:44:56 -04:00
2014-06-05 17:01:59 -04:00
2014-08-09 11:26:34 -04:00
2014-01-14 09:01:06 -05:00
2014-04-17 17:44:36 -04:00
2014-10-03 17:26:50 +03:00
2014-10-25 07:02:01 -04:00
2013-10-14 16:06:53 -04:00
2014-03-21 16:43:59 -04:00
2014-03-21 16:43:59 -04:00
2013-10-14 16:06:53 -04:00
2014-10-22 10:36:47 -06:00
2014-03-21 16:43:59 -04:00
2014-10-22 10:36:46 -06:00
2014-09-24 18:30:27 -04:00
2014-09-25 08:36:19 -07:00
2013-07-24 09:44:38 -04:00
2014-06-19 11:19:04 -04:00
2013-07-24 09:44:38 -04:00
2014-10-27 17:54:12 -04:00
2014-11-07 16:27:05 -05:00
2014-10-28 20:44:04 -06:00
2014-06-19 11:19:04 -04:00
2014-10-28 20:44:04 -06:00
2013-10-14 16:06:53 -04:00
2014-06-20 11:54:29 -06:00
2014-09-24 18:30:29 -04:00
2010-01-18 00:23:00 +01:00
2014-09-16 12:23:56 -04:00
2014-10-29 09:02:09 -04:00
2011-10-22 01:13:35 +02:00
2014-07-18 17:53:23 -04:00
2014-10-23 11:53:01 -04:00
2014-02-21 11:06:13 -05:00
2014-10-25 07:01:59 -04:00
2013-07-24 09:44:38 -04:00
2014-10-25 07:27:37 -04:00
2013-07-24 09:44:38 -04:00
2014-07-18 17:53:23 -04:00
2014-11-04 06:04:00 +01:00
2013-07-24 09:44:38 -04:00
2014-11-04 06:03:59 +01:00
2014-11-04 06:04:01 +01:00
2014-10-27 11:04:01 -04:00
2014-11-04 06:03:59 +01:00
2014-06-11 16:27:06 -04:00