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

Bounds on variables may use undefined values #726

Open
kyleheadley opened this issue Oct 15, 2021 · 0 comments
Open

Bounds on variables may use undefined values #726

kyleheadley opened this issue Oct 15, 2021 · 0 comments
Labels
array bounds benchmark failure A bug causing a failure in our nightly benchmark tests

Comments

@kyleheadley
Copy link
Member

similar to #524, but outside of function prototypes

3C will infer : count(length) bounds on arrays from related variables, but those variables may not be in the local scope. for example, from icecast:

connection.c:456:44: error: use of undeclared identifier 'dst'
    _Array_ptr<struct pollfd> ufds : count(dst);
                                           ^

and the pre-converted code is:

    struct pollfd ufds [global.server_sockets];
    if(...) {
        ...
    else {
        int dst;
        ...
        global.server_sockets = dst;
        ...
    }

from yacr2:

./channel.h:42:38: error: use of undeclared identifier 'channelColumns'
extern _Array_ptr<ulong> TOP : count(channelColumns);
                                     ^

This file contains global defs and channelColumns is defined soon after TOP (along with other counters). I assume the connection is made from usage in another file.

@kyleheadley kyleheadley added array bounds benchmark failure A bug causing a failure in our nightly benchmark tests labels Oct 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
array bounds benchmark failure A bug causing a failure in our nightly benchmark tests
Projects
None yet
Development

No branches or pull requests

1 participant