mirror of
https://github.com/Z3Prover/z3
synced 2025-08-13 06:30:54 +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:
parent
b38abf64d7
commit
0d4b4b30b1
21 changed files with 75 additions and 76 deletions
|
@ -35,7 +35,7 @@ namespace Microsoft.Z3
|
|||
{
|
||||
Contract.Requires(name != null);
|
||||
|
||||
Native.Z3_params_set_bool(Context.nCtx, NativeObject, name.NativeObject, (value));
|
||||
Native.Z3_params_set_bool(Context.nCtx, NativeObject, name.NativeObject, (byte)(value ? 1 : 0));
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -90,7 +90,7 @@ namespace Microsoft.Z3
|
|||
/// </summary>
|
||||
public Params Add(string name, bool value)
|
||||
{
|
||||
Native.Z3_params_set_bool(Context.nCtx, NativeObject, Context.MkSymbol(name).NativeObject, (value));
|
||||
Native.Z3_params_set_bool(Context.nCtx, NativeObject, Context.MkSymbol(name).NativeObject, (byte)(value ? 1 : 0));
|
||||
return this;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue