Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8258396: SIGILL in jdk.jfr.internal.PlatformRecorder.rotateDisk() #29

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter
Filter file types
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.

Always

Just for now

@@ -405,7 +405,7 @@ BufferPtr JfrStorage::flush(BufferPtr cur, size_t used, size_t req, bool native,

BufferPtr JfrStorage::flush_regular(BufferPtr cur, const u1* const cur_pos, size_t used, size_t req, bool native, Thread* t) {
debug_only(assert_flush_regular_precondition(cur, cur_pos, used, req, t);)
// A flush is needed before memcpy since a non-large buffer is thread stable
// A flush is needed before memmove since a non-large buffer is thread stable
// (thread local). The flush will not modify memory in addresses above pos()
// which is where the "used / uncommitted" data resides. It is therefore both
// possible and valid to migrate data after the flush. This is however only
@@ -417,7 +417,8 @@ BufferPtr JfrStorage::flush_regular(BufferPtr cur, const u1* const cur_pos, size
if (cur->free_size() >= req) {
// simplest case, no switching of buffers
if (used > 0) {
memcpy(cur->pos(), (void*)cur_pos, used);
// source and destination may overlap so memmove must be used instead of memcpy
memmove(cur->pos(), (void*)cur_pos, used);
}
assert(native ? t->jfr_thread_local()->native_buffer() == cur : t->jfr_thread_local()->java_buffer() == cur, "invariant");
return cur;
ProTip! Use n and p to navigate between commits in a pull request.