Fixup for dl_iterate_phdr after bug 808121. r=me
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 07 Nov 2012 16:45:48 +0100
changeset 112517 8776d96f00996dd3958d14f8e56beffff2ae33b1
parent 112516 8671bfc8e9a8a2db56fc7fda7eda734e50f1ea25
child 112518 abac7a34e15cc8d6d172acb3485f155332d51aee
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersme
bugs808121
milestone19.0a1
Fixup for dl_iterate_phdr after bug 808121. r=me
mozglue/linker/ElfLoader.cpp
--- a/mozglue/linker/ElfLoader.cpp
+++ b/mozglue/linker/ElfLoader.cpp
@@ -91,17 +91,17 @@ int
     return 0;
   info->dli_fname = handle->GetPath();
   return 1;
 }
 
 int
 __wrap_dl_iterate_phdr(dl_phdr_cb callback, void *data)
 {
-  if (ElfLoader::Singleton.dbg)
+  if (!ElfLoader::Singleton.dbg)
     return -1;
 
   for (ElfLoader::DebuggerHelper::iterator it = ElfLoader::Singleton.dbg.begin();
        it < ElfLoader::Singleton.dbg.end(); ++it) {
     dl_phdr_info info;
     info.dlpi_addr = reinterpret_cast<Elf::Addr>(it->l_addr);
     info.dlpi_name = it->l_name;
     info.dlpi_phdr = NULL;