Skip to content

Conversation

xdustinface
Copy link

@xdustinface xdustinface commented Jul 14, 2020

Having const char* leads to undefined behaviour if the const char* is deallocated before the thread used it.

This wasn't an issue so far since there were no dynamic thread names but #3601 kind of requires this and i thought that should rather be a separate PR then.

@UdjinM6 UdjinM6 added this to the 16 milestone Jul 14, 2020
…string"

Having "const char*" leads to undefined behaviour if the "const char*"
is deallocated before the thread used it.

Co-Authored-By: UdjinM6 <UdjinM6@users.noreply.github.com>
@xdustinface xdustinface force-pushed the pr-util-thrace-thread branch from 3b6254a to dfbb81b Compare July 14, 2020 14:24
@xdustinface xdustinface changed the title util: Change TraceThread's "name" type: "const char*" -> "std::string" util: Change TraceThread's "name" type: "const char*" -> "const std::string" Jul 14, 2020
@xdustinface
Copy link
Author

xdustinface commented Jul 14, 2020

Applied the changes and renamed the commit + PR title!

Copy link
Member

@PastaPastaPasta PastaPastaPasta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

Copy link

@codablock codablock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK

@UdjinM6 UdjinM6 merged commit f44dd06 into dashpay:develop Jul 14, 2020
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Aug 23, 2020
…string" (dashpay#3609)

Having "const char*" leads to undefined behaviour if the "const char*"
is deallocated before the thread used it.

Co-Authored-By: UdjinM6 <UdjinM6@users.noreply.github.com>

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
@PastaPastaPasta
Copy link
Member

backported in #3670

gades pushed a commit to cosanta/cosanta-core that referenced this pull request Mar 16, 2022
…string" (dashpay#3609)

Having "const char*" leads to undefined behaviour if the "const char*"
is deallocated before the thread used it.

Co-Authored-By: UdjinM6 <UdjinM6@users.noreply.github.com>

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants