Edward O'Callaghan (eocallaghan@alterapraxis.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5314
-gerrit
commit 033958f02d1bb600163b333168d360ba047399fc Author: Edward O'Callaghan eocallaghan@alterapraxis.com Date: Sat Mar 1 09:27:37 2014 +1100
lib/selfboot: s_srcaddr is uninitialized.
s_srcaddr is uninitialized in the BSS section, leading to a garbage valued operand on the LHS of a '<' on line 383.
Change-Id: Ie4fec91b09c70fb1d91ad3918ac3f60653fa1d83 Signed-off-by: Edward O'Callaghan eocallaghan@alterapraxis.com --- src/lib/selfboot.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/src/lib/selfboot.c b/src/lib/selfboot.c index 222eae2..98ed66d 100644 --- a/src/lib/selfboot.c +++ b/src/lib/selfboot.c @@ -352,6 +352,9 @@ static int build_self_segment_list( ntohl(segment->mem_len)); new = malloc(sizeof(*new)); new->s_filesz = 0; + new->s_srcaddr = (uintptr_t) + ((unsigned char *)first_segment) + + ntohl(segment->offset); new->s_dstaddr = ntohll(segment->load_addr); new->s_memsz = ntohl(segment->mem_len); break;