-
Notifications
You must be signed in to change notification settings - Fork 545
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
fmt crash #1100
Comments
I notice in the stack trace it crashes at:
|
Are you able to provide a stack trace? From the looks of it, something in fmt is calling its |
Here it is:
|
Just a thought, but looking at |
It doesn't look like it, but I'm not seeing where the problem is, either. And some things don't make sense. For one, it lists the point in unsigned spec_width = to_unsigned(specs.width); Tracing backwards more, we find template <typename Char, typename OutputIt, typename T,
FMT_ENABLE_IF(std::is_same<T, void>::value)>
auto write(OutputIt out, const T* value, const format_specs& specs = {},
locale_ref = {}) -> OutputIt {
return write_ptr<Char>(out, bit_cast<uintptr_t>(value), &specs);
} Which makes sense since the formatter is specified as // Format specifiers for built-in and string types.
struct format_specs : basic_specs {
int width;
int precision;
constexpr format_specs() : width(0), precision(-1) {}
}; So FMT_ASSERT(std::is_unsigned<Int>::value || value >= 0, "negative value"); should pass since Out of curiosity, are you using static linking for OpenAL Soft? And if so, are you also using (or static linking something else that also uses) a copy of fmt? |
Just for reference,
this line seems to take an extremely long time to process even when it doesn't crash, unsure why.
I'm both static linking OpenAL Soft, and static linking my own copy of fmt. |
The reason for the long time seems to be here:
Specifically, |
For reference, |
According to the debugger, the value seems to be |
Just as a side note, it would be great if as a user I could modify It might not cover all cases, but being able to set it ex. before I start openal would help work around these cases. |
That shouldn't happen either, since I think the issue might be because:
This would result in two copies of fmt being linked together, which if they're not the same version or compiled the same, could result in ODR (One Definition Rule) violations. In particular, if the compiler doesn't inline certain functions it will output an instance of the function body in the object file and generate a call to it, while at link time, the compiler will see multiple versions of the function and pick one to place in the resulting executable. If the version of the function picked doesn't behave as a given caller expects, like it assumes the wrong padding for structs or placement of struct members, or expects parameters passed in different ways, it could end up reading wrong/junk values. If that's the problem, it might not be too hard to fix. In inline namespace v11 { You can change that
That's what the |
Thank you, I only needed to update the namespace in openalsoft's version, and now things are fine! If an official update can be made, I'd be happy to get rid of my fork. |
As this is a user application, and my users don't know much about environment variables, this sadly isn't a viable option... |
Hi, I'm not sure why, but I seem to (sometimes) get a crash here:
https://github.com/kcat/openal-soft/blob/master/alc/alc.cpp#L3051
The crash occurs at:
with
message
beingnegative value
Logs:
The text was updated successfully, but these errors were encountered: