Comments (4)
This initializer appears to be the regex
type's default initializer, so it's not quite as weird or edge-case-y as its usage by chpl__deserialize
might suggest. I think documenting this initializer and putting some kind of .. warning::
could help users who still accidentally write code like the above example.
An even better next step (separate from this issue) would be to add some better checking for this case within regex
's implementation and issue some better errors.
from chapel.
I would imagine this initializer comes up primarily with things like var x: regex;
and that it's significantly more common in that form than new regex(string)
etc. Generally speaking, I think it's reasonable for regex
to be default-initializable; and that it should not core dump when you go to write one of those. Of course, the alternative idea is to prevent it from being default-initializable, but IMO that is not called for here.
from chapel.
I'm ok with no-doc'ing it. chpl__deserialize
's use is not a good precedent. What it does with the quasi-initialized regex is also not user-facing.
The only use case I can think of is to create a dummy empty regex for a sentinel value or a dummy return
, but the way to do it should be new regex("")
.
from chapel.
It seems like the general consensus is that this should stay in the public interface and be documented, and that we should fix the bug.
The bug comes from a nullptr dereference in the re2 runtime shim, where regex->regex
is a nullptr. writeln
triggers 1 of the possible errors. There are a few other ways to hit this. I will patch these and open a PR with the bug fix and the documentation (with a warning about possible erroneous behavior when used incorrectly)
from chapel.
Related Issues (20)
- Missing deprecation warnings for converting `owned` to `shared`
- Internal error when building Chapel code with HIP module loaded HOT 7
- Apparent bug in readBinary() (for sufficiently large files? sufficiently large offsets within files? array slice reads?) HOT 3
- GPU: Initializers with promoted expressions don't get GPUized. HOT 3
- assertOnGpu fails when applied to `foreach` with custom iterator HOT 2
- Discussion on forall intents
- GPU Kernels in Standard Modules cause segfaults or internal errors
- Restore support for casting expressions to strings?
- forall reductions fail silently for GPU HOT 6
- dyno: incremental re-scope resolution causes recursive query when standard modules are enabled HOT 1
- Using `CHPL_GPU=cpu` with the gnu compiler gives an attribute warning HOT 3
- Stabilizing Associative Domains and Arrays HOT 1
- stdin/stdout/stderr store the dummy locale rather than locale 0 HOT 1
- Improve IO's bulk read/write performance when endianness is non-native HOT 2
- Clarify documentation around profiling based on user feedback HOT 1
- Add a note to the GPU technote about best practices for host profiling when using the GPU locale model HOT 3
- Add support for `-pg` to the LLVM back-end? HOT 1
- Capitalization / Naming of ioendian HOT 6
- Can Chapel code use a param to detect endianness?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chapel.