Skip to content

Commit

Permalink
Merge branch 'lwawrzyniak/fix-vfprintf-crash' into 'main'
Browse files Browse the repository at this point in the history
Fix a crash in vfprintf on some systems

See merge request omniverse/warp!728
  • Loading branch information
mmacklin committed Sep 17, 2024
2 parents d42eac2 + 4fde12f commit e4052af
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
- Fix a bug in which Python docstrings would be created as local function variables in generated code.
- Allow passing custom launch dimensions to `jax_kernel()`.
- Add new Jax interoperability examples for sharding and matrix multiplication (see Interoperability documentation).
- Fix a rare crash during error reporting on some systems.

## [1.3.3] - 2024-09-04

Expand Down
6 changes: 4 additions & 2 deletions warp/native/error.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ void set_error_string(const char* fmt, ...)
vsnprintf(g_error_buffer, sizeof(g_error_buffer), fmt, args);
if (g_error_output_enabled)
{
vfprintf(g_error_stream, fmt, args);
// note: we deliberately avoid vfprintf() due to problems with runtime glibc mismatch
fputs(g_error_buffer, g_error_stream);
fputc('\n', g_error_stream);
fflush(g_error_stream);
}
Expand All @@ -46,7 +47,8 @@ void append_error_string(const char* fmt, ...)
vsnprintf(g_error_buffer + offset, sizeof(g_error_buffer) - offset, fmt, args);
if (g_error_output_enabled)
{
vfprintf(g_error_stream, fmt, args);
// note: we deliberately avoid vfprintf() due to problems with runtime glibc mismatch
fputs(g_error_buffer + offset, g_error_stream);
fputc('\n', g_error_stream);
fflush(g_error_stream);
}
Expand Down

0 comments on commit e4052af

Please sign in to comment.