Skip to content

Do not allow --Wdisable to disable errors.#2

Draft
kfcripps wants to merge 9 commits intomainfrom
5312-upstream
Draft

Do not allow --Wdisable to disable errors.#2
kfcripps wants to merge 9 commits intomainfrom
5312-upstream

Conversation

@kfcripps
Copy link
Owner

TODO: Fix warnings by running ninja -j4 --update:

[19/490] Building CXX object _deps/protobuf-build/CMakeFiles/libprotobuf.dir/src/google/protobuf/message_lite.cc.o
In file included from /usr/include/string.h:495,
                 from /local/kfcripps/repos/p4c/build/ninja/release/_deps/protobuf-src/src/google/protobuf/stubs/port.h:39,
                 from /local/kfcripps/repos/p4c/build/ninja/release/_deps/protobuf-src/src/google/protobuf/stubs/common.h:48,
                 from /local/kfcripps/repos/p4c/build/ninja/release/_deps/protobuf-src/src/google/protobuf/message_lite.h:46,
                 from /local/kfcripps/repos/p4c/build/ninja/release/_deps/protobuf-src/src/google/protobuf/message_lite.cc:36:
In function 'void* memcpy(void*, const void*, size_t)',
    inlined from 'uint8_t* google::protobuf::io::EpsCopyOutputStream::WriteRaw(const void*, int, uint8_t*)' at /local/kfcripps/repos/p4c/build/ninja/release/_deps/protobuf-src/src/google/protobuf/io/coded_stream.h:684:16,
    inlined from 'virtual uint8_t* google::protobuf::internal::ImplicitWeakMessage::_InternalSerialize(uint8_t*, google::protobuf::io::EpsCopyOutputStream*) const' at /local/kfcripps/repos/p4c/build/ninja/release/_deps/protobuf-src/src/google/protobuf/implicit_weak_message.h:103:28,
    inlined from 'bool google::protobuf::MessageLite::SerializePartialToZeroCopyStream(google::protobuf::io::ZeroCopyOutputStream*) const' at /local/kfcripps/repos/p4c/build/ninja/release/_deps/protobuf-src/src/google/protobuf/message_lite.cc:411:30:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:34:33: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' specified size between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]
   34 |   return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
      |          ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[254/490] [BISON][p4Parser] Building parser with bison 3.5.1
/local/kfcripps/repos/p4c/frontends/parsers/p4/p4parser.ypp:26.1-36: warning: deprecated directive: '%define parser_class_name {P4Parser}', use '%define api.parser.class {P4Parser}' [-Wdeprecated]
   26 | %define parser_class_name {P4Parser}
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      | %define api.parser.class {P4Parser}
/local/kfcripps/repos/p4c/frontends/parsers/p4/p4parser.ypp: warning: fix-its can be applied.  Rerun with option '--update'. [-Wother]
[256/490] [BISON][v1Parser] Building parser with bison 3.5.1
/local/kfcripps/repos/p4c/frontends/parsers/v1/v1parser.ypp:25.1-36: warning: deprecated directive: '%define parser_class_name {V1Parser}', use '%define api.parser.class {V1Parser}' [-Wdeprecated]
   25 | %define parser_class_name {V1Parser}
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      | %define api.parser.class {V1Parser}
/local/kfcripps/repos/p4c/frontends/parsers/v1/v1parser.ypp: warning: fix-its can be applied.  Rerun with option '--update'. [-Wother]

@kfcripps
Copy link
Owner Author

kfcripps commented Jan 26, 2024

cmake options: -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=. -DENABLE_BMV2=ON -DENABLE_EBPF=OFF -DENABLE_UBPF=OFF -DENABLE_DPDK=OFF -DENABLE_P4TEST=ON -DENABLE_GC=ON
P4TEST_REPLACE=1 ninja check on this branch:

98% tests passed, 41 tests failed out of 1775

Label Time Summary:
err          =  81.15 sec*proc (315 tests)
gtest        =  34.14 sec*proc (1 test)
p14_to_16    = 669.80 sec*proc (194 tests)
p4           = 2370.05 sec*proc (1215 tests)
p4tc         =  39.95 sec*proc (33 tests)
p4unroll     =  30.95 sec*proc (13 tests)

Total Test time (real) = 101.75 sec

The following tests FAILED:
        851 - p4/testdata/p4_16_samples/pna-dpdk-bvec_union.p4 (Failed)
        854 - p4/testdata/p4_16_samples/pna-dpdk-direct-meter-learner.p4 (Failed)
        855 - p4/testdata/p4_16_samples/pna-dpdk-flatten-local-struct-decl.p4 (Failed)
        857 - p4/testdata/p4_16_samples/pna-dpdk-header-union-stack.p4 (Failed)
        858 - p4/testdata/p4_16_samples/pna-dpdk-header-union-stack1.p4 (Failed)
        859 - p4/testdata/p4_16_samples/pna-dpdk-header-union-stack2.p4 (Failed)
        860 - p4/testdata/p4_16_samples/pna-dpdk-invalid-hdr-warnings5.p4 (Failed)
        861 - p4/testdata/p4_16_samples/pna-dpdk-invalid-hdr-warnings6.p4 (Failed)
        862 - p4/testdata/p4_16_samples/pna-dpdk-parser-state-err.p4 (Failed)
        863 - p4/testdata/p4_16_samples/pna-dpdk-parser-wrong-arith.p4 (Failed)
        864 - p4/testdata/p4_16_samples/pna-dpdk-small_sample.p4 (Failed)
        871 - p4/testdata/p4_16_samples/pna-dpdk-table-key-use-annon.p4 (Failed)
        872 - p4/testdata/p4_16_samples/pna-dpdk-toeplitz-hash-1.p4 (Failed)
        873 - p4/testdata/p4_16_samples/pna-dpdk-toeplitz-hash.p4 (Failed)
        874 - p4/testdata/p4_16_samples/pna-dpdk-union-bmv2.p4 (Failed)
        875 - p4/testdata/p4_16_samples/pna-dpdk-wrong-warning.p4 (Failed)
        876 - p4/testdata/p4_16_samples/pna-elim-hdr-copy-dpdk.p4 (Failed)
        882 - p4/testdata/p4_16_samples/pna-example-dpdk-varbit-1.p4 (Failed)
        883 - p4/testdata/p4_16_samples/pna-example-dpdk-varbit.p4 (Failed)
        886 - p4/testdata/p4_16_samples/pna-example-ipsec.p4 (Failed)
        908 - p4/testdata/p4_16_samples/pna-too-big-label-name-dpdk.p4 (Failed)
        945 - p4/testdata/p4_16_samples/psa-dpdk-checksum-arg-header.p4 (Failed)
        952 - p4/testdata/p4_16_samples/psa-dpdk-large-header-fields.p4 (Failed)
        953 - p4/testdata/p4_16_samples/psa-dpdk-large-struct-fields.p4 (Failed)
        968 - p4/testdata/p4_16_samples/psa-dpdk-table-entries-exact-ternary.p4 (Failed)
        992 - p4/testdata/p4_16_samples/psa-dpdk-tmp-mask-align.p4 (Failed)
        1000 - p4/testdata/p4_16_samples/psa-example-dpdk-byte-alignment_1.p4 (Failed)
        1001 - p4/testdata/p4_16_samples/psa-example-dpdk-byte-alignment_2.p4 (Failed)
        1002 - p4/testdata/p4_16_samples/psa-example-dpdk-byte-alignment_3.p4 (Failed)
        1004 - p4/testdata/p4_16_samples/psa-example-dpdk-byte-alignment_5.p4 (Failed)
        1005 - p4/testdata/p4_16_samples/psa-example-dpdk-byte-alignment_6.p4 (Failed)
        1006 - p4/testdata/p4_16_samples/psa-example-dpdk-byte-alignment_7.p4 (Failed)
        1007 - p4/testdata/p4_16_samples/psa-example-dpdk-byte-alignment_8.p4 (Failed)
        1008 - p4/testdata/p4_16_samples/psa-example-dpdk-byte-alignment_9.p4 (Failed)
        1009 - p4/testdata/p4_16_samples/psa-example-dpdk-counter.p4 (Failed)
        1010 - p4/testdata/p4_16_samples/psa-example-dpdk-directmeter.p4 (Failed)
        1011 - p4/testdata/p4_16_samples/psa-example-dpdk-externs.p4 (Failed)
        1012 - p4/testdata/p4_16_samples/psa-example-dpdk-local-variable.p4 (Failed)
        1013 - p4/testdata/p4_16_samples/psa-example-dpdk-meter-execute-err.p4 (Failed)
        1014 - p4/testdata/p4_16_samples/psa-example-dpdk-meter.p4 (Failed)
        1015 - p4/testdata/p4_16_samples/psa-example-dpdk-meter1.p4 (Failed)
Errors while running CTest

@kfcripps
Copy link
Owner Author

p4test --p4runtime-files out.json --arch v1model --target bmv2 testdata/p4_16_samples/psa-example-dpdk-byte-alignment_1.p4 -I p4include/

@kfcripps
Copy link
Owner Author

cmake options: -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=. -DENABLE_BMV2=ON -DENABLE_EBPF=OFF -DENABLE_UBPF=OFF -DENABLE_DPDK=OFF -DENABLE_P4TEST=ON -DENABLE_GC=ON
P4TEST_REPLACE=1 make check on this branch:

98% tests passed, 41 tests failed out of 1775

Label Time Summary:
err          =  82.66 sec*proc (315 tests)
gtest        =  33.85 sec*proc (1 test)
p14_to_16    = 677.88 sec*proc (194 tests)
p4           = 2406.49 sec*proc (1215 tests)
p4tc         =  40.60 sec*proc (33 tests)
p4unroll     =  31.43 sec*proc (13 tests)

Total Test time (real) = 101.65 sec

The following tests FAILED:
        851 - p4/testdata/p4_16_samples/pna-dpdk-bvec_union.p4 (Failed)
        854 - p4/testdata/p4_16_samples/pna-dpdk-direct-meter-learner.p4 (Failed)
        855 - p4/testdata/p4_16_samples/pna-dpdk-flatten-local-struct-decl.p4 (Failed)
        857 - p4/testdata/p4_16_samples/pna-dpdk-header-union-stack.p4 (Failed)
        858 - p4/testdata/p4_16_samples/pna-dpdk-header-union-stack1.p4 (Failed)
        859 - p4/testdata/p4_16_samples/pna-dpdk-header-union-stack2.p4 (Failed)
        860 - p4/testdata/p4_16_samples/pna-dpdk-invalid-hdr-warnings5.p4 (Failed)
        861 - p4/testdata/p4_16_samples/pna-dpdk-invalid-hdr-warnings6.p4 (Failed)
        862 - p4/testdata/p4_16_samples/pna-dpdk-parser-state-err.p4 (Failed)
        863 - p4/testdata/p4_16_samples/pna-dpdk-parser-wrong-arith.p4 (Failed)
        864 - p4/testdata/p4_16_samples/pna-dpdk-small_sample.p4 (Failed)
        871 - p4/testdata/p4_16_samples/pna-dpdk-table-key-use-annon.p4 (Failed)
        872 - p4/testdata/p4_16_samples/pna-dpdk-toeplitz-hash-1.p4 (Failed)
        873 - p4/testdata/p4_16_samples/pna-dpdk-toeplitz-hash.p4 (Failed)
        874 - p4/testdata/p4_16_samples/pna-dpdk-union-bmv2.p4 (Failed)
        875 - p4/testdata/p4_16_samples/pna-dpdk-wrong-warning.p4 (Failed)
        876 - p4/testdata/p4_16_samples/pna-elim-hdr-copy-dpdk.p4 (Failed)
        882 - p4/testdata/p4_16_samples/pna-example-dpdk-varbit-1.p4 (Failed)
        883 - p4/testdata/p4_16_samples/pna-example-dpdk-varbit.p4 (Failed)
        886 - p4/testdata/p4_16_samples/pna-example-ipsec.p4 (Failed)
        908 - p4/testdata/p4_16_samples/pna-too-big-label-name-dpdk.p4 (Failed)
        945 - p4/testdata/p4_16_samples/psa-dpdk-checksum-arg-header.p4 (Failed)
        952 - p4/testdata/p4_16_samples/psa-dpdk-large-header-fields.p4 (Failed)
        953 - p4/testdata/p4_16_samples/psa-dpdk-large-struct-fields.p4 (Failed)
        968 - p4/testdata/p4_16_samples/psa-dpdk-table-entries-exact-ternary.p4 (Failed)
        992 - p4/testdata/p4_16_samples/psa-dpdk-tmp-mask-align.p4 (Failed)
        1000 - p4/testdata/p4_16_samples/psa-example-dpdk-byte-alignment_1.p4 (Failed)
        1001 - p4/testdata/p4_16_samples/psa-example-dpdk-byte-alignment_2.p4 (Failed)
        1002 - p4/testdata/p4_16_samples/psa-example-dpdk-byte-alignment_3.p4 (Failed)
        1004 - p4/testdata/p4_16_samples/psa-example-dpdk-byte-alignment_5.p4 (Failed)
        1005 - p4/testdata/p4_16_samples/psa-example-dpdk-byte-alignment_6.p4 (Failed)
        1006 - p4/testdata/p4_16_samples/psa-example-dpdk-byte-alignment_7.p4 (Failed)
        1007 - p4/testdata/p4_16_samples/psa-example-dpdk-byte-alignment_8.p4 (Failed)
        1008 - p4/testdata/p4_16_samples/psa-example-dpdk-byte-alignment_9.p4 (Failed)
        1009 - p4/testdata/p4_16_samples/psa-example-dpdk-counter.p4 (Failed)
        1010 - p4/testdata/p4_16_samples/psa-example-dpdk-directmeter.p4 (Failed)
        1011 - p4/testdata/p4_16_samples/psa-example-dpdk-externs.p4 (Failed)
        1012 - p4/testdata/p4_16_samples/psa-example-dpdk-local-variable.p4 (Failed)
        1013 - p4/testdata/p4_16_samples/psa-example-dpdk-meter-execute-err.p4 (Failed)
        1014 - p4/testdata/p4_16_samples/psa-example-dpdk-meter.p4 (Failed)
        1015 - p4/testdata/p4_16_samples/psa-example-dpdk-meter1.p4 (Failed)
Errors while running CTest

@kfcripps
Copy link
Owner Author

cmake options: -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=. -DENABLE_BMV2=ON -DENABLE_EBPF=OFF -DENABLE_UBPF=OFF -DENABLE_DPDK=OFF -DENABLE_P4TEST=ON -DENABLE_GC=ON
P4TEST_REPLACE=1 ninja check on main branch:

98% tests passed, 41 tests failed out of 1775

Label Time Summary:
err          =  86.48 sec*proc (315 tests)
gtest        =  58.28 sec*proc (1 test)
p14_to_16    = 722.83 sec*proc (194 tests)
p4           = 2382.54 sec*proc (1215 tests)
p4tc         =  43.38 sec*proc (33 tests)
p4unroll     =  30.78 sec*proc (13 tests)

Total Test time (real) =  83.60 sec

The following tests FAILED:
        851 - p4/testdata/p4_16_samples/pna-dpdk-bvec_union.p4 (Failed)
        854 - p4/testdata/p4_16_samples/pna-dpdk-direct-meter-learner.p4 (Failed)
        855 - p4/testdata/p4_16_samples/pna-dpdk-flatten-local-struct-decl.p4 (Failed)
        857 - p4/testdata/p4_16_samples/pna-dpdk-header-union-stack.p4 (Failed)
        858 - p4/testdata/p4_16_samples/pna-dpdk-header-union-stack1.p4 (Failed)
        859 - p4/testdata/p4_16_samples/pna-dpdk-header-union-stack2.p4 (Failed)
        860 - p4/testdata/p4_16_samples/pna-dpdk-invalid-hdr-warnings5.p4 (Failed)
        861 - p4/testdata/p4_16_samples/pna-dpdk-invalid-hdr-warnings6.p4 (Failed)
        862 - p4/testdata/p4_16_samples/pna-dpdk-parser-state-err.p4 (Failed)
        863 - p4/testdata/p4_16_samples/pna-dpdk-parser-wrong-arith.p4 (Failed)
        864 - p4/testdata/p4_16_samples/pna-dpdk-small_sample.p4 (Failed)
        871 - p4/testdata/p4_16_samples/pna-dpdk-table-key-use-annon.p4 (Failed)
        872 - p4/testdata/p4_16_samples/pna-dpdk-toeplitz-hash-1.p4 (Failed)
        873 - p4/testdata/p4_16_samples/pna-dpdk-toeplitz-hash.p4 (Failed)
        874 - p4/testdata/p4_16_samples/pna-dpdk-union-bmv2.p4 (Failed)
        875 - p4/testdata/p4_16_samples/pna-dpdk-wrong-warning.p4 (Failed)
        876 - p4/testdata/p4_16_samples/pna-elim-hdr-copy-dpdk.p4 (Failed)
        882 - p4/testdata/p4_16_samples/pna-example-dpdk-varbit-1.p4 (Failed)
        883 - p4/testdata/p4_16_samples/pna-example-dpdk-varbit.p4 (Failed)
        886 - p4/testdata/p4_16_samples/pna-example-ipsec.p4 (Failed)
        908 - p4/testdata/p4_16_samples/pna-too-big-label-name-dpdk.p4 (Failed)
        945 - p4/testdata/p4_16_samples/psa-dpdk-checksum-arg-header.p4 (Failed)
        952 - p4/testdata/p4_16_samples/psa-dpdk-large-header-fields.p4 (Failed)
        953 - p4/testdata/p4_16_samples/psa-dpdk-large-struct-fields.p4 (Failed)
        968 - p4/testdata/p4_16_samples/psa-dpdk-table-entries-exact-ternary.p4 (Failed)
        992 - p4/testdata/p4_16_samples/psa-dpdk-tmp-mask-align.p4 (Failed)
        1000 - p4/testdata/p4_16_samples/psa-example-dpdk-byte-alignment_1.p4 (Failed)
        1001 - p4/testdata/p4_16_samples/psa-example-dpdk-byte-alignment_2.p4 (Failed)
        1002 - p4/testdata/p4_16_samples/psa-example-dpdk-byte-alignment_3.p4 (Failed)
        1004 - p4/testdata/p4_16_samples/psa-example-dpdk-byte-alignment_5.p4 (Failed)
        1005 - p4/testdata/p4_16_samples/psa-example-dpdk-byte-alignment_6.p4 (Failed)
        1006 - p4/testdata/p4_16_samples/psa-example-dpdk-byte-alignment_7.p4 (Failed)
        1007 - p4/testdata/p4_16_samples/psa-example-dpdk-byte-alignment_8.p4 (Failed)
        1008 - p4/testdata/p4_16_samples/psa-example-dpdk-byte-alignment_9.p4 (Failed)
        1009 - p4/testdata/p4_16_samples/psa-example-dpdk-counter.p4 (Failed)
        1010 - p4/testdata/p4_16_samples/psa-example-dpdk-directmeter.p4 (Failed)
        1011 - p4/testdata/p4_16_samples/psa-example-dpdk-externs.p4 (Failed)
        1012 - p4/testdata/p4_16_samples/psa-example-dpdk-local-variable.p4 (Failed)
        1013 - p4/testdata/p4_16_samples/psa-example-dpdk-meter-execute-err.p4 (Failed)
        1014 - p4/testdata/p4_16_samples/psa-example-dpdk-meter.p4 (Failed)
        1015 - p4/testdata/p4_16_samples/psa-example-dpdk-meter1.p4 (Failed)
Errors while running CTest

@kfcripps kfcripps force-pushed the 5312-upstream branch 2 times, most recently from 07f490f to 311aaa6 Compare January 26, 2024 02:45
@kfcripps kfcripps force-pushed the 5312-upstream branch 3 times, most recently from ab0238b to bd2c6c0 Compare February 5, 2024 23:57
thomascalvert-xlnx and others added 4 commits February 6, 2024 16:19
…#4327)

* backends/ebpf: Track header start offset in bytes rather than bits.

* backends/ebpf: Remove most remaining uses of bits offset var.

Uses still remain in ubpf and tc backends. It would be easy to move the
variable definition to the uBPFProgram class, however TC uses eBPFProgram
directly (without inheritance).

ubpf could be changed to use a byte-level header var as was done in eBPF,
however it supports bit-level advance() calls.

* testdata: Update p4tc golden outputs following offset tracking changes.

This patch also sets the executable bit on all .template files. This is
done by the TC backend when they are created, however for some reason
never made it to the reference outputs, and the checker script doesn't
look at permissions.
…4lang#4387)

* Small hotfixes to prevent crashes.

* Review comments and fixes.
* Avoid possible silent null-deref in Options::usage
* Avoid possible silent null-deref in alias.h
* Fix null defer in type checking (after type error)
* Avoid null pointer deref in convertErrors
* Avoid redundant check for null
* Make sure diagnostics don't try to dereference null node just to get its source location
* Avoid redundant dynamic cast
* Fix tautological condition
* Avoid closing file with pclose when not preprocessing
* Fix "changes" flag initialization
vbnogueira and others added 5 commits February 7, 2024 07:31
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.

5 participants