RFR: JDK-8320383: refresh libraries cache on AIX in VMError::report [v3]

Thomas Stuefe stuefe at openjdk.org
Fri Nov 24 08:29:16 UTC 2023


On Fri, 24 Nov 2023 07:54:27 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:

>> src/hotspot/share/utilities/vmError.cpp line 727:
>> 
>>> 725:   if (should_report_bug(_id)) {
>>> 726:     os::prepare_native_symbols();
>>> 727:   }
>> 
>> Ugh, misuse of "should report bug" as "is oom error" :-/ But no problem, I see you just repeat the existing pattern, that is fine. We can clean that in a separate patch.
>
> Hi Thomas, any suggestion for a better name? Maybe there was a reason to keep it generic ?

If you want to change this, I would do this:


-  static bool should_report_bug(unsigned int id) {
-    return (id != OOM_MALLOC_ERROR) && (id != OOM_MMAP_ERROR);
-  }
+  static bool is_oom_error(unsigned int id) {
+    return (id == OOM_MALLOC_ERROR) || (id == OOM_MMAP_ERROR);
+  }
+  static bool should_report_bug(unsigned int id) {
+    // since oom errors depend on external test conditions, they don't count as real bugs
+    return !is_oom_error(id);
+  }

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/16730#discussion_r1404066346


More information about the hotspot-dev mailing list