Skip to content
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

specifying CFLAGS at configure-time nullifies --enable-debug option #3

Closed
GoogleCodeExporter opened this issue May 15, 2015 · 4 comments
Labels
Milestone

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?

./configure --enable-debug CFLAGS='-DGIDS_DEBUG'

What is the expected output? What do you see instead?

CFLAGS arising from --enable-debug should be appended to those explicitly set at configure-time. In addition, NDEBUG should not be defined.

$ egrep ^CFLAGS Makefile
CFLAGS = -DGIDS_DEBUG -Wall -Werror -pedantic -g

$ grep NDEBUG config/config.h
/* #undef NDEBUG */

Instead, CFLAGS from --enable-debug are omitted and NDEBUG is defined.

$ egrep ^CFLAGS Makefile
CFLAGS = -DGIDS_DEBUG

$ grep NDEBUG config/config.h
#define NDEBUG 1

What version of the software are you using? On what operating system?

munge-0.5.9
Debian squeeze/sid 2.6.32-5-amd64

Original issue reported on code.google.com by chris.m.dunlap on 6 Jan 2011 at 11:44

@GoogleCodeExporter
Copy link
Author

This issue was updated by svn:r874 / d7bdc9a.

Created issue-3 branch.

Original comment by chris.m.dunlap on 7 Jan 2011 at 12:17

  • Changed state: Started

@GoogleCodeExporter
Copy link
Author

CFLAGS arising from --enable-debug should precede those specified in the CFLAGS user-variable (in order to allow them to be overridden). Furthermore, they should be placed in something like DEBUGCFLAGS (without an underscore!) and passed via AM_CFLAGS. Refer to https://www.gnu.org/software/automake/manual/html_node/Flag-Variables-Ordering.html.

Original comment by chris.m.dunlap on 7 Jan 2011 at 1:58

@GoogleCodeExporter
Copy link
Author

This issue was closed by svn:r876 / 7fc7e4e.

Original comment by chris.m.dunlap on 7 Jan 2011 at 2:52

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

Original comment by chris.m.dunlap on 4 Feb 2011 at 3:31

  • Added labels: Milestone-0.5.10

@dun dun added bug and removed auto-migrated labels Jun 4, 2015
@dun dun added this to the 0.5.10 milestone Jun 4, 2015
dun added a commit that referenced this issue Feb 1, 2019
Add the HKDF test vectors from RFC 5869: HMAC-based Extract-and-Expand
Key Derivation Function (HKDF), Appendix A.

- Test Case 1: SHA-256 basic test
- Test Case 2: SHA-256 with longer inputs/outputs
- Test Case 3: SHA-256 with zero-length salt/info
- Test Case 4: SHA-1 basic test
- Test Case 5: SHA-1 with longer inputs/outputs
- Test Case 6: SHA-1 with zero-length salt/info
- Test Case 7: SHA-1 with no salt and zero-length info

Test case #3 and #6 fail due to an assert() error: "mac_init:
Assertion `keylen > 0' failed".  Consequently, these two cases are
being skipped and will be fixed in a later commit.  Note that with
libtap, todo() cannot be used here since it is for a test expected
to fail with an appropriate error code.  Instead, skip() must be
used since this failure is caused by an assert() which terminates
execution via abort().

Signed-off-by: Chris Dunlap <cdunlap@llnl.gov>
dun added a commit that referenced this issue Feb 1, 2019
The HKDF test vectors for case #3 and #6 in RFC 5869 specify a
salt length of 0 octets.  The HKDF salt is used as the HMAC key for
computing the PRK in the "extraction" phase.  In this first phase,
mac_init() starts by validating its parameters and assert()ing
'keylen' is > 0.  The salt length of 0 octets causes this assertion
to needlessly fail.

Update the 'keylen' assertion to ensure its value is >= 0.

Signed-off-by: Chris Dunlap <cdunlap@llnl.gov>
dun added a commit that referenced this issue Apr 28, 2019
Add the HKDF test vectors from RFC 5869: HMAC-based Extract-and-Expand
Key Derivation Function (HKDF), Appendix A.

- Test Case 1: SHA-256 basic test
- Test Case 2: SHA-256 with longer inputs/outputs
- Test Case 3: SHA-256 with zero-length salt/info
- Test Case 4: SHA-1 basic test
- Test Case 5: SHA-1 with longer inputs/outputs
- Test Case 6: SHA-1 with zero-length salt/info
- Test Case 7: SHA-1 with no salt and zero-length info

Test case #3 and #6 fail due to an assert() error: "mac_init:
Assertion `keylen > 0' failed".  Consequently, these two cases are
being skipped and will be fixed in a later commit.  Note that with
libtap, todo() cannot be used here since it is for a test expected
to fail with an appropriate error code.  Instead, skip() must be
used since this failure is caused by an assert() which terminates
execution via abort().

Signed-off-by: Chris Dunlap <cdunlap@llnl.gov>
dun added a commit that referenced this issue Apr 28, 2019
The HKDF test vectors for case #3 and #6 in RFC 5869 specify a
salt length of 0 octets.  The HKDF salt is used as the HMAC key for
computing the PRK in the "extraction" phase.  In this first phase,
mac_init() starts by validating its parameters and assert()ing
'keylen' is > 0.  The salt length of 0 octets causes this assertion
to needlessly fail.

Update the 'keylen' assertion to ensure its value is >= 0.

Signed-off-by: Chris Dunlap <cdunlap@llnl.gov>
dun added a commit that referenced this issue May 7, 2019
Add the HKDF test vectors from RFC 5869: HMAC-based Extract-and-Expand
Key Derivation Function (HKDF), Appendix A.

- Test Case 1: SHA-256 basic test
- Test Case 2: SHA-256 with longer inputs/outputs
- Test Case 3: SHA-256 with zero-length salt/info
- Test Case 4: SHA-1 basic test
- Test Case 5: SHA-1 with longer inputs/outputs
- Test Case 6: SHA-1 with zero-length salt/info
- Test Case 7: SHA-1 with no salt and zero-length info

Test case #3 and #6 fail due to an assert() error: "mac_init:
Assertion `keylen > 0' failed".  Consequently, these two cases are
being skipped and will be fixed in a later commit.  Note that with
libtap, todo() cannot be used here since it is for a test expected
to fail with an appropriate error code.  Instead, skip() must be
used since this failure is caused by an assert() which terminates
execution via abort().

Signed-off-by: Chris Dunlap <cdunlap@llnl.gov>
dun added a commit that referenced this issue May 7, 2019
The HKDF test vectors for case #3 and #6 in RFC 5869 specify a
salt length of 0 octets.  The HKDF salt is used as the HMAC key for
computing the PRK in the "extraction" phase.  In this first phase,
mac_init() starts by validating its parameters and assert()ing
'keylen' is > 0.  The salt length of 0 octets causes this assertion
to needlessly fail.

Update the 'keylen' assertion to ensure its value is >= 0.

Signed-off-by: Chris Dunlap <cdunlap@llnl.gov>
dun added a commit that referenced this issue Oct 7, 2020
why is this file getting truncated?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants