소스 검색

x86_64: ensure that dtor pointer passed to app is 0 so it won't be used

leaving it uninitialized caused unpredictable crashes or worse due to
calling an indeterminate function pointer.
Rich Felker 14 년 전
부모
커밋
779165e6d4
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      src/ldso/x86_64/start.s

+ 1 - 0
src/ldso/x86_64/start.s

@@ -5,4 +5,5 @@ _start:
 	lea 8(%rsp),%rsi
 	lea _GLOBAL_OFFSET_TABLE_(%rip),%rdx
 	call __dynlink
+	xor %edx,%edx
 	jmp *%rax