dmlc / dmlc-core

A common bricks library for building scalable and portable distributed machine learning.
Apache License 2.0
864 stars 520 forks source link

[logging] fix leak in LOG(FATAL) #626

Closed okuvshynov closed 4 years ago

okuvshynov commented 4 years ago

As trivialfis pointed out, even though this allocation happens right before fatal is logged, that might be caught, and process might continue execution.

Use unique_ptr instead.

okuvshynov commented 4 years ago

reported at https://github.com/dmlc/dmlc-core/issues/625

tqchen commented 4 years ago

cc @junrushao1994

trivialfis commented 4 years ago

@okuvshynov Thanks for fixing the issue!