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

Segmentation Fault in DartVM when running invalid code. #18949

Closed
DartBot opened this issue May 21, 2014 · 4 comments
Closed

Segmentation Fault in DartVM when running invalid code. #18949

DartBot opened this issue May 21, 2014 · 4 comments
Assignees
Labels
area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. P1 A high priority bug; for example, a single project is unusable or has many test failures

Comments

@DartBot
Copy link

DartBot commented May 21, 2014

This issue was originally filed by @austincummings


What steps will reproduce the problem?
Run the follow code in the 64bit linux Dart VM.

import 'dart:mirrors';
 
class Todo {
    final String owner;
    final String task;
    final String dueDate;
 
    const Todo([this.owner, this.task, this.dueDate]);
}
 
checkTodos() {
    reflect(main).function.metadata.forEach((meta) {
        var owner = meta.reflectee.owner;
        var task = meta.reflectee.task;
        var dueDate = DateTime.parse(meta.reflectee.dueDate);
        if (dueDate.compareTo(new DateTime.now()) < 0) {
            throw "$task is not done yet. Blame $owner.";
        }
    });
}
 
get todo => const Todo();
 
// @­Todo('austincummings', 'This this this', '2020-01-01')
@todo
void main() {
    checkTodos();
}

What is the expected output? What do you see instead?
It should give a syntax error or prevent the program from running due to the annotation not being a constant on line 25.

What version of the product are you using? On what operating system?
64-bit DartVM 1.3.6, Linux 64-bit in VirtualBox

Please provide any additional information below.
When running dartanalyzer on the above code, an error is found that reads:

[error] Annotation can be only constant variable or constant constructor invocation (/home/austin/workspace/ddb/test/expando_test.dart, line 25, col 1)


Attachment:
expando_test.dart (642 Bytes)

@kasperl
Copy link

kasperl commented May 22, 2014

Thanks for the report, Austin. Does this reproduce with version 1.4.0?


Added Area-VM, Triaged labels.

@iposva-google
Copy link
Contributor

Set owner to @rmacnak-google.
Added Accepted label.

@iposva-google
Copy link
Contributor

Removed Priority-Unassigned label.
Added Priority-High label.

@rmacnak-google
Copy link
Contributor

r36522


Added Fixed label.

@DartBot DartBot added Type-Defect P1 A high priority bug; for example, a single project is unusable or has many test failures area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. labels May 22, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. P1 A high priority bug; for example, a single project is unusable or has many test failures
Projects
None yet
Development

No branches or pull requests

4 participants