Comments (2)
I have identified where in CMOR this segfault is happening. Below is a section of cmor_CV_checkFurtherInfoURL
that checks if the URL template has tokens separated by '<' and '>' characters.
Lines 379 to 385 in 8d45339
When passing an emtpy string to
strtok
, it will assign a null to szToken. This will cause strcmp
to segfault when comparing szToken.
This lead to discovering another behavior of this function: Using the further info URL of the current dataset as a template.
Lines 373 to 377 in 8d45339
If you were to have the following value in your user input...
"further_info_url": "https://furtherinfo.es-doc.org/<mip_era><source_id>"
then the function will treat that as a template to be turned into a URL for comparison.
It will then proceed to compare what is provided by the user input with the URL created from the template.
C Traceback:
In function:
!!!!!!!!!!!!!!!!!!!!!!!!!
!
! Warning: The further info in attribute does not match the one found in your Control Vocabulary(CV) File.
! We found "https://furtherinfo.es-doc.org/<mip_era><source_id>" and
! CV requires "https://furtherinfo.es-doc.org/CMIP6.PCMDI-test-1-0"
! Check your Control Vocabulary file "Tables/CMIP6_CV.json".
!
!
!!!!!!!!!!!!!!!!!!!!!!!!!
So any string that begins with "https://furtherinfo.es-doc.org/" will be valid input according to the CV's further_info_url
value, but not if they contain any of the template tokens such as the ones in cmor.h
Line 266 in 8d45339
from cmor.
@mauzey1 it would be great to catch this segfault, and rather issue an error message suggesting changes required to the user and quit, does that seems reasonable?
from cmor.
Related Issues (20)
- CMOR 3.7.3
- CMOR segfaults with mip cmor tables and CMIP6Plus CV.json HOT 14
- Test suite cleanup
- Exposing latest netcdf 4.9.x library functionality: quantize, zstandard HOT 13
- Remove unused attributes when processing CMIP6Plus datasets HOT 14
- Exposing latest netcdf 4.9.x library functionality: quantize, zstandard HOT 43
- unclear warning... HOT 5
- bounds required on singleton lon and lat? HOT 5
- avoid attributes of bounds of auxilliary coordinates (`vertices_latitudes` / `vertices_longitude`) HOT 5
- Calibrating CMOR3 & 4 forward development plans HOT 7
- CMOR 3.8.0 Release HOT 4
- Update README.md to remove v3.7 reference
- default `realm = "REALM"` is always written although not required by CV HOT 2
- order in `required_global_attributes` matters HOT 1
- input time type as INT HOT 3
- CircleCI current image deprecated HOT 1
- Numpy 2.0 compatibility issue HOT 2
- File output size and chunking HOT 9
- Message Logging generates duplicated output lines
- DESTDIR support HOT 2
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 cmor.