-
Notifications
You must be signed in to change notification settings - Fork 158
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
assignments: Introduce mini-libc assignment #209
assignments: Introduce mini-libc assignment #209
Conversation
4322d7b
to
8282c23
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a few suggestions for the prompt of bash commands.
8282c23
to
f7afeda
Compare
05afe62
to
2ab673a
Compare
8bd8d6b
to
637fb7e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At first glance, things look good enough. The suggested changes are purely cosmetic, so focus on merging this ASAP.
fi | ||
|
||
"$exec_file" & | ||
PID=$! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, I noticed that without an extra sleep less than 1 second added here (to account for the 1s sleep in the source file), the behaviour is unexpected, generating different results on different runs, not sure if it is a problem only on my end but the extra sleep generates a stable response on multiple runs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was also what I noticed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pufi656, @JunisvaultCo, I now understand the issue. Will be back with a fix, please then let me know if it works on your side.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@razvand, can't it be also improved by using interruption signals?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pufi656, @JunisvaultCo, please see if the updated version works for you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pufi656, what about the othe malloc
/ mmap
scripts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@razvand, I've checked with latest changes from this pr an right now only these 2 tests are failing:
test_multiple_malloc_free ........................ failed ... 0
test_malloc_free_sequence ........................ failed ... 0
I will check what is the cause, but probably the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nvm, everything seems to be working fine, I should clean the remotes and check again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@razvand confirming all scripts regarding memory testing work fine
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
confirmed as well
c8828d6
to
46fa63d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks ok to me, only minor changes.
aea89b6
to
8a06acb
Compare
Mini-libc is a minimalistic standard C library (libc) implementation. It is meant to be used as a complete replacement for the system libc (glibc in Linux). This is why test programs are built with `-nostinc`, `-nostlib`, `-fno-builtin` options. The actual library source code is part of the `libc/` directory. It is to be compiled as a static library in the `libc.a` file. A set of sample use cases, as C source files, are stored in the `samples/` directory. Tests are in the `tests/` directory, both as source code and shell scripts. The aim is to have a minimally functional libc with features such as: - string management - very basic memory support - POSIX file I/O (i.e. `open()`, `read()`, `write()`) - basic printing (`puts()`) - sleep functions Signed-off-by: Razvan Deaconescu <razvan.deaconescu@upb.ro> Signed-off-by: Ruxandra Grigorie <ruxi.grigorie@gmail.com> Signed-off-by: Teodor Dutu <teodor.dutu@gmail.com> Signed-off-by: Adrian Șendroiu <molecula2788@gmail.com> Signed-off-by: Gabriel Mocanu <gabi.mocanu98@gmail.com> Signed-off-by: Alexandru Apostolescu <alexx.apostolescu@gmail.com> Signed-off-by: Alex-Costin Puflene <alexpufi22@yahoo.com> Signed-off-by: Vlad Tiftilov <vlad.tiftilov@yahoo.com> Signed-off-by: Laurențiu Ursu <laurentiu.ursu2001@gmail.com> Signed-off-by: Iulia-Silvia Plăiașu <isplaiasu@gmail.com>
8a06acb
to
e085bb0
Compare
Mini-libc is a minimalistic standard C library (libc) implementation. It is meant to be used as a complete replacement for the system libc (glibc in Linux). This is why test programs are built with
-nostinc
,-nostlib
,-fno-builtin
options.The actual library source code is part of the
libc/
directory. It is to be compiled as a static library in thelibc.a
file.A set of sample use cases, as C source files, are stored in the
samples/
directory.Tests are in the
tests/
directory, both as source code and shell scripts.The aim is to have a minimally functional libc with features such as:
open()
,read()
,write()
)puts()
)