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

Refactor build system #8

Merged
merged 2 commits into from
Jun 8, 2020
Merged

Refactor build system #8

merged 2 commits into from
Jun 8, 2020

Conversation

JayKickliter
Copy link
Contributor

See helium/erlang-h3#14 for more details, as this PR is pretty much identical.

@JayKickliter JayKickliter marked this pull request as draft May 28, 2020 20:22
@JayKickliter JayKickliter requested review from fvasquez and madninja May 28, 2020 22:59
@JayKickliter JayKickliter force-pushed the jsk/cmake branch 7 times, most recently from 4d977f5 to c8090ad Compare May 29, 2020 23:35
@JayKickliter
Copy link
Contributor Author

See intentional buffer overflow in action.

@fvasquez
Copy link

I'll look at this closely along with helium/erlang-h3#14 on Tuesday.

@JayKickliter JayKickliter marked this pull request as ready for review June 1, 2020 23:02
Copy link

@fvasquez fvasquez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one significant comment regarding a calloc.

c_src/erasure.c Outdated
@@ -67,7 +67,7 @@ encode(ErlNifEnv * env, int argc, const ERL_NIF_TERM argv[])
int bytes_per_shard = input.size / k;
int extra_bytes = input.size % k;

char *shards = calloc(k+m, blockspacing);
char *shards = calloc(k+m, blockspacing-1);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really? An off by one error?!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added that on purpose to trigger an error. I'll rebase without that commit before merging.

c_src/cmake/FindGFComplete.cmake Show resolved Hide resolved
Copy link

@fvasquez fvasquez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Glad to see it working.

1. switch to cmake for better control of build
2. add compile-time static-analysis
3. add support for santization
@JayKickliter JayKickliter merged commit 6220931 into master Jun 8, 2020
@JayKickliter JayKickliter deleted the jsk/cmake branch June 8, 2020 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants