File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 11/*
2- * Copyright (c) 1997, 2023 , Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 1997, 2024 , Oracle and/or its affiliates. All rights reserved.
33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44 *
55 * This code is free software; you can redistribute it and/or modify it
2828#include " asm/macroAssembler.hpp"
2929#include " code/vmreg.hpp"
3030#include " memory/allStatic.hpp"
31+ #include " sanitizers/ub.hpp"
3132#include " utilities/checkedCast.hpp"
3233
3334// A VtableStub holds an individual code stub for a pair (vtable index, #args) for either itables or vtables
@@ -173,6 +174,9 @@ class VtableStub {
173174 public:
174175 // Query
175176 bool is_itable_stub () { return !_is_vtable_stub; }
177+ // We reinterpret arbitrary memory as VtableStub. This does not cause failures because the lookup/equality
178+ // check will reject false objects. Disabling UBSan is a temporary workaround until JDK-8331725 is fixed.
179+ ATTRIBUTE_NO_UBSAN
176180 bool is_vtable_stub () { return _is_vtable_stub; }
177181 bool is_abstract_method_error (address epc) { return epc == code_begin ()+_ame_offset; }
178182 bool is_null_pointer_exception (address epc) { return epc == code_begin ()+_npe_offset; }
You can’t perform that action at this time.
0 commit comments