Giter Site home page Giter Site logo

copp-skeleton's People

Contributors

atzeus avatar beelux avatar blacknovatech avatar dr-noid avatar gregory-swiader avatar gregoryswiader avatar hmng avatar kaierikniermann avatar khaganmv avatar laustam avatar lkm-schulz avatar mhkarsten avatar quardellv avatar r0mbertus avatar ricovl avatar sirmc avatar sse245 avatar stefvanschie avatar tizianocoroneo avatar twoneis avatar workofartiz avatar yelicopter avatar zainmunir avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

copp-skeleton's Issues

The endianness helper function from `util.c` use undefined behaviour

The read_uint32_t function uses undefined behaviour which can be catched by make testsanitizers when running testadvanced2.

image

By using left shift on the uint8_t it gets promoted to a signed int. If we shift so far that the sign bit can get flipped we get undefined behaviour.

I will submit a pull request for a simple fix which first casts to uint32_t.

Leftover files after make clean

Makefile does not remove all of the created files with make clean. Testadvanced3, and therefore testadvanced and testall, creates a tmp_output file, which remains in the folder even after make clean is used.

Task4 testsuite for WIDE are insufficient.

The task4 tests do not test any regular I- prefixed instructions after a WIDE prefixed one. So you don't actually have to reset your compilers WIDE flag to pass the task4 tests.

Names that end with _t are reserved

I'm not certain of the genealogy, but a number of standards align on this and here are a few scattered quotes and references:

Names that end with โ€˜_tโ€™ are reserved for additional type names.

-From the GNU Reserved Names page

The requirement that additional types defined in this section end in "_t" was prompted by the problem of name space pollution. It is difficult to define a type (where that type is not one defined by POSIX.1-2017) in one header file and use it in another without adding symbols to the name space of the program. To allow implementors to provide their own types, all conforming applications are required to avoid symbols ending in "_t", which permits the implementor to provide additional types. Because a major use of types is in the definition of structure members, which can (and in many cases must) be added to the structures defined in POSIX.1-2017, the need for additional types is compelling.

-From the The Open Group Base Specifications Issue 7

Typedef names beginning with int or uint and ending with _t may be added to the types defined
in the <stdint.h> header. Macro names beginning with INT or UINT and ending with _MAX, _MIN,
or _C may be added to the macros defined in the <stdint.h> header.

-From ISO9899 7.31.10 (Library > Future library directions > Integer types <stdint.h>) which I think I can't link legally

(The clusivity of the "and" in that last one is ambiguous, but I assume it means both names beginning with int/uint and names ending with _t, not just both in combination. I may be wrong.)

...Consequently, renaming word_t and byte_t would be more POSIX-compliant. I'm not sure if that's necessary in this case, but I see a lot of submissions using for instance stack_t, mimicking the typedefs we set, and this might be ingraining a bad habit for students going forward to future projects.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.