3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-02-16 13:51:44 +00:00

change storage layout of .Net binding Z3_bool to byte to deal with uninitialized memory reads on larger allocation sizes. Bug introduced when switching from defining Z3_bool as int to the bool type from stdbool

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2018-07-02 02:58:06 -07:00
parent b38abf64d7
commit 0d4b4b30b1
21 changed files with 75 additions and 76 deletions

View file

@ -65,7 +65,7 @@ namespace Microsoft.Z3
public static string GetParameter(string id)
{
IntPtr t;
if (Native.Z3_global_param_get(id, out t) == false)
if (Native.Z3_global_param_get(id, out t) == 0)
return null;
else
return Marshal.PtrToStringAnsi(t);
@ -91,7 +91,7 @@ namespace Microsoft.Z3
/// all contexts globally.</remarks>
public static void ToggleWarningMessages(bool enabled)
{
Native.Z3_toggle_warning_messages(enabled);
Native.Z3_toggle_warning_messages((byte)(enabled ? 1 : 0));
}
/// <summary>