소스 검색

A patch included in glibc 2.3.2's libthread_db that helps remote
debugging not become confused,

Eric Andersen 19 년 전
부모
커밋
909aec10fe
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      libpthread/linuxthreads_db/td_ta_new.c

+ 4 - 0
libpthread/linuxthreads_db/td_ta_new.c

@@ -126,6 +126,10 @@ td_ta_new (struct ps_prochandle *ps, td_thragent_t **ta)
     {
       if (ps_pdread (ps, addr, &(*ta)->sizeof_descr, sizeof (int)) != PS_OK)
 	goto free_return;
+      /* Don't let bogons in the inferior make us mess ourselves.  */
+      if ((*ta)->sizeof_descr > sizeof (struct _pthread_descr_struct))
+	  (*ta)->sizeof_descr = sizeof (struct _pthread_descr_struct);
+
     }
 
   /* Now add the new agent descriptor to the list.  */