[PATCH] D98437: [SystemZ][z/OS] Add GOFFObjectFile class support for HDR, ESD and END records

Kevin P. Neal via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 20 10:46:19 PDT 2021


kpn added a comment.

There's still not much testing here, and there is plenty to test. The continuation records, for example. Tests can verify that all the invalid cases are rejected. Tests can also verify that GOFF is rejected if it is missing an HDR card or missing an END card. And since GOFF objects can be concatenated you can test that an object deck that is HDR+ESD+END+HDR+ESD+END is handled properly.

I have found that round tripping is a good, efficient way to test. If I can't write out what I just read in without changing it then there might be a problem.



================
Comment at: llvm/include/llvm/Object/GOFF.h:59
+        assert(!Record::isContinued(Slice) &&
+               "Continued bit should not be set");
+
----------------
It looks like this allows for invalid GOFF where more data is expected but the last card of the continuation is hit.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98437/new/

https://reviews.llvm.org/D98437



More information about the llvm-commits mailing list