Skip to content

Commit

Permalink
Small updates to perserve legacy behavior
Browse files Browse the repository at this point in the history
A couple of small fixes that affect behavior of contracts (these
showed up with pdo-contracts tests):

* make the default for '/' in a json string not to be escaped, this
  shows up in json encoding of keys
* add __cxa_pure_function implementation that is missing from WASI
  SDK

Signed-off-by: Mic Bowman <[email protected]>
  • Loading branch information
cmickeyb authored and marcelamelara committed Jan 8, 2024
1 parent b9139c5 commit 471953a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions common/packages/parson/parson.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,11 @@
static JSON_Malloc_Function parson_malloc = malloc;
static JSON_Free_Function parson_free = free;

#ifndef COMPILE_FOR_SGX
static int parson_escape_slashes = 1;
#else
static int parson_escape_slashes = 0;
#endif

static char *parson_float_format = NULL;

Expand Down
6 changes: 6 additions & 0 deletions contracts/wawaka/common/Util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ int vfprintf(FILE *__restrict, const char *__restrict, __isoc_va_list)
return -1;
}

extern "C" void __cxa_pure_virtual(void)
{
CONTRACT_SAFE_LOG(4, "missing pure virtual function");
std::abort();
}

#endif

/* ----------------------------------------------------------------- *
Expand Down

0 comments on commit 471953a

Please sign in to comment.