Skip to content

Add signature of gettimeofday js library function#14969

Merged
sbc100 merged 2 commits intoemscripten-core:mainfrom
ravisumit33:main
Aug 31, 2021
Merged

Add signature of gettimeofday js library function#14969
sbc100 merged 2 commits intoemscripten-core:mainfrom
ravisumit33:main

Conversation

@ravisumit33
Copy link
Contributor

@ravisumit33 ravisumit33 commented Aug 30, 2021

Fixes: #14959

@welcome
Copy link

welcome bot commented Aug 30, 2021

Thank you for submitting a pull request! Someone will be along to review it shortly.

@ravisumit33
Copy link
Contributor Author

@sbc100 Please review

src/library.js Outdated
if (clk_id) {{{ makeSetValue('clk_id', 0, 2/*CLOCK_PROCESS_CPUTIME_ID*/, 'i32') }}};
return 0;
},
gettimeofday__sig: 'ii',
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think the sig of this function is iii (return an int and takes 2 pointers).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

May be I am wrong, but I can see only one argument ptr in the function gettimeofday (here)

Copy link
Collaborator

Choose a reason for hiding this comment

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

It take a second argument which is the timezone (which this version currently completely ignores I guess): https://man7.org/linux/man-pages/man2/settimeofday.2.html.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated

@sbc100 sbc100 enabled auto-merge (squash) August 30, 2021 17:41
@ravisumit33
Copy link
Contributor Author

ravisumit33 commented Aug 30, 2021

@sbc100 Failing test shows context deadline exceeded. Any idea what can cause that ?

@sbc100
Copy link
Collaborator

sbc100 commented Aug 31, 2021

That's test flakiness, I restarted the test run.

@sbc100 sbc100 merged commit 30863fb into emscripten-core:main Aug 31, 2021
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.

RuntimeError: abort(Assertion failed: Missing signature argument to addFunction: ...) when building with -g

2 participants