forked from deephaven/deephaven-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix accidental double-freeing of log entries and fix LogEntry API (de…
…ephaven#4060) This logging code was accidentally misusing the LogEntry API, calling endl() multiple times. This resulted in the same entry being put into the pool multiple time. Later on, the entry could be used by multiple threads logging at the same time. Most of the time this would result in garbage logs, but occasionally it would result in an NPE. This also breaks LogEntry binary and (potentially) source compatibility to ensure users can't string together fluent end()/endl(). Note: it's still possible for callers to double-free ```java le = log.info(); le.append("hello"); le.append("world"); le.endl(); le.endl(); ``` but this is a much rarer pattern. Adding additional runtime safety checks would be possible, but would not be free. Fixes deephaven#4051
- Loading branch information
1 parent
452df84
commit feae9d0
Showing
8 changed files
with
27 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters