Skip to content
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

Enable fuzz to run on aarch64 platform #20

Merged
merged 2 commits into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion fuzz/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,13 @@ add_definitions("-DIO_SEPROXYHAL_BUFFER_SIZE_B=128") # cmake -DIO_SEPROXYHAL_BUF
add_definitions("-DTARGET_NANOS=1")

add_library(bsd STATIC IMPORTED)
set_property(TARGET bsd PROPERTY IMPORTED_LOCATION /lib/x86_64-linux-gnu/libbsd.a)
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
set_property(TARGET bsd PROPERTY IMPORTED_LOCATION /lib/x86_64-linux-gnu/libbsd.a)
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
set_property(TARGET bsd PROPERTY IMPORTED_LOCATION /lib/aarch64-linux-gnu/libbsd.a)
else()
message(FATAL_ERROR "Unsupported platform: ${CMAKE_SYSTEM_PROCESSOR}")
endif()

include_directories(../libstellar/include)
include_directories(${BOLOS_SDK}/lib_standard_app)
Expand Down
2 changes: 1 addition & 1 deletion libstellar/base64.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
#include <stdint.h>
#include <stdbool.h>

bool base64_encode(const uint8_t *data, size_t in_len, char *out, size_t out_len);
bool base64_encode(const uint8_t *data, size_t in_len, char *out, size_t out_len);
4 changes: 2 additions & 2 deletions libstellar/formatter.c
Original file line number Diff line number Diff line change
Expand Up @@ -2492,7 +2492,7 @@ static uint8_t get_data_count(formatter_data_t *fdata) {
return op_cnt + 1;
}

void reset_formatter() {
void reset_formatter(void) {
explicit_bzero(formatter_stack, sizeof(formatter_stack));
formatter_index = 0;
current_data_index = 0;
Expand Down Expand Up @@ -2563,4 +2563,4 @@ bool get_next_data(formatter_data_t *fdata, bool forward, bool *data_exists, boo
}

return true;
}
}
2 changes: 1 addition & 1 deletion libstellar/include/stellar/formatter.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ typedef struct {
/**
* Reset the formatter state.
*/
void reset_formatter();
void reset_formatter(void);

/**
* Get the next data to display.
Expand Down
2 changes: 1 addition & 1 deletion libstellar/parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -1513,4 +1513,4 @@ bool parse_soroban_authorization_envelope(const uint8_t *data,
// envelope->soroban_authorization.sub_invocation_positions[i]);
// }
return true;
}
}
2 changes: 1 addition & 1 deletion libstellar/printer.c
Original file line number Diff line number Diff line change
Expand Up @@ -936,4 +936,4 @@ bool print_scv_string(const scv_string_t *scv_string, char *out, size_t out_len)
}

return true;
}
}
Loading