Skip to content

Add Guard Statement to large number.#54

Open
yeguang-xue wants to merge 5 commits into
ansys:mainfrom
yeguang-xue:patch-1
Open

Add Guard Statement to large number.#54
yeguang-xue wants to merge 5 commits into
ansys:mainfrom
yeguang-xue:patch-1

Conversation

@yeguang-xue
Copy link
Copy Markdown

For number like 1.0E28, it crashes on MacOS due to buffer overflow (but linux/windows seems to be fine, maybe Mac has more strict memory check). E.g. the following statement will fail:

import hollerith as holler

buf = io.StringIO()
holler.write_float(buf, 1e28, 10)
print(buf.getvalue())

Unfortunately some LS-Dyna Keyword Cards have default values 1e28.

yeguang-xue and others added 2 commits January 10, 2026 11:17
For number like 1.0E28, it crashes on MacOS -- due to buffer overflow.
@koubaa
Copy link
Copy Markdown
Collaborator

koubaa commented Jun 1, 2026

That change looks ok - but we need a test case to cover it.

@Revathyvenugopal162
Copy link
Copy Markdown
Collaborator

@cla-bot rerun

@ansys-cla-bot
Copy link
Copy Markdown

ansys-cla-bot Bot commented Jun 1, 2026

The following people have not signed the Contributors License Agreement (CLA):

Read the CLA in the link above and sign it by clicking below:

You will receive a confirmation as soon as your signature is captured.

Note

Action Required: Repository maintainers with write access can trigger a recheck by commenting
@cla-bot rerun
Please contact the maintainers to rerun the CLA check after the missing signatures have been captured.

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.

3 participants