-
Notifications
You must be signed in to change notification settings - Fork 423
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
Stop relying on FILENAME_MAX #8757
Comments
I see that FILENAME_MAX is used in many places, library,files,log etc should we convert all those char arrays into strings? |
@yozaam: Sorry for the slow response; I've been on summer vacation and just got back today. I think you're right that converting char arrays within the compiler to strings would be attractive and get away from this issue (a |
@bradcray I tried looking into the issue. In the
is used.
This could reduce the reliance on FILENAME_MAX. We could also check if the pointer returned by malloc is NULL and then gives some error, like Memory allocation error. This could be done in almost all of the places in |
@rchinmay I think you're on the right track. I'd probably use If you're adding a |
@daviditen @bradcray I tried to solve this. Changes made to
Please correct me if I am wrong anywhere. I have presently completed the changes in |
@rchinmay : As a high-level thought, how about doing the changes to the runtime/ directory in one PR if that felt clean and straightforward; and then we could worry about the more challenging compiler directory in a separate effort. That way the part that it sounds like you've successfully completed could be captured rather than lost (if we can't land the compiler portion for some reason). As far as the compiler goes, my instinct would be to lean on std::string rather than reverting to Admittedly, I think a lot of this code was written by me at the dawn of time, and I'm much more of a C than C++ programmer, so thanks for taking a look. |
@bradcray Yes, I think it is possible to convert to |
@rchinmay : That matches my thinking: If we could get away from things like |
@bradcray @daviditen I was stuck in a problem since a couple of days while solving this issue. In |
@rchinmay : Sorry for the slow response here. Do you have a branch that contains your current attempt here? I think it might be easiest for me to understand the problem well and suggest paths forward if I could see that. |
@rchinmay : As we wrap up the spring release, I wanted to ping on this again to see whether you have a branch that I could look at to understand your last question? |
@bradcray Thanks for informing about the spring release. I had lost the progress of the changes made as I had not made a separate branch for it, neither committed the changes to any branch. I will rework on it on the areas that I had problem implementing with, and I will tag you after linking the branch here. |
@bradcray
Also, the |
Hmm. I think in order to have the Chapel Updating all the (I'd think that as long as And also both cases in |
@cassella Thank you for your advice. I have added a new flag type for strings with |
Looking at picking this up due to #26261. We could resume from those partially-completed PRs, but they might be old enough now that it'd just be less work to start fresh. |
On PR #8733, @cassella writes:
So the proposal here is to do as Paul suggests on a rainy day.
[edit: there's a strong start to this on PR #17059 that needs someone to see it through. See also #17517 ]
The text was updated successfully, but these errors were encountered: