소스 검색

fix dlopen UB due to longjmp/volatile rules violation

Rich Felker 13 년 전
부모
커밋
2fdea17c3d
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/ldso/dynlink.c

+ 1 - 1
src/ldso/dynlink.c

@@ -536,7 +536,7 @@ void *__dynlink(int argc, char **argv, size_t *got)
 
 void *dlopen(const char *file, int mode)
 {
-	struct dso *p, *orig_tail = tail, *next;
+	struct dso *volatile p, *orig_tail = tail, *next;
 	size_t i;
 
 	if (!file) return head;