jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • JRuby
  • JRUBY-821

getting in $SAFE level 4 freezes

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: JRuby 0.9.9
  • Fix Version/s: JRuby 1.1
  • Component/s: Interpreter
  • Labels:
    None
  • Environment:
      
    « Hide
    macosx 10.4.9, JRuby 0.9.9 svn3467,
    java version "1.5.0_07" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-164) Java HotSpot(TM) Client VM (build 1.5.0_07-87, mixed mode, sharing)
  • Testcase included:
    yes

Description

I know $SAFE levels are not really supported by JRuby for now, reporting anyway.

Setting the $SAFE level to 4 freezes the VM (escape with CTRL-C still possible).

Might have some interest.

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. File
    test_safe_level_4.rb
    16/Apr/07 2:06 AM
    0.3 kB
    John Mettraux

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Charles Oliver Nutter added a comment - 16/Apr/07 2:01 PM

We very much appreciate reports on safe level bugs, especially with provided tests. If there's any test suites out there that hit safe levels and unsafe features like tainting really hard we'd love to know about it.

So how about your opinion on one thing: since safe levels are fairly broken in JRuby right now, should we just disable them and display a warning when someone sets safe levels? It seems the best case for broken safe levels would be that they don't actually do anything, since code would continue to run correctly.

Show
Charles Oliver Nutter added a comment - 16/Apr/07 2:01 PM We very much appreciate reports on safe level bugs, especially with provided tests. If there's any test suites out there that hit safe levels and unsafe features like tainting really hard we'd love to know about it. So how about your opinion on one thing: since safe levels are fairly broken in JRuby right now, should we just disable them and display a warning when someone sets safe levels? It seems the best case for broken safe levels would be that they don't actually do anything, since code would continue to run correctly.
Hide
Permalink
John Mettraux added a comment - 16/Apr/07 6:24 PM

Hi Charles,

> should we just disable them and display a warning when someone sets safe levels?

seems like the best immediate solution. I wouldn't even warn at setting the level, I'd just warn "in the documentation".

If I can spare some cycles, I will look for a test suite for safe levels and tainting, and post back.

Show
John Mettraux added a comment - 16/Apr/07 6:24 PM Hi Charles, > should we just disable them and display a warning when someone sets safe levels? seems like the best immediate solution. I wouldn't even warn at setting the level, I'd just warn "in the documentation". If I can spare some cycles, I will look for a test suite for safe levels and tainting, and post back.
Hide
Permalink
Charles Oliver Nutter added a comment - 16/Apr/07 6:38 PM

I'd almost feel better with a runtime warning (maybe only once?) so people don't have a false sense of security in their code on JRuby...but it's debatable.

A suite of tests that really hit SAFE and all hard would be really, really cool for you to contribute.

Show
Charles Oliver Nutter added a comment - 16/Apr/07 6:38 PM I'd almost feel better with a runtime warning (maybe only once?) so people don't have a false sense of security in their code on JRuby...but it's debatable. A suite of tests that really hit SAFE and all hard would be really, really cool for you to contribute.
Hide
Permalink
Charles Oliver Nutter added a comment - 23/Oct/07 3:19 PM

I think we need to take a stand on SAFE levels; make them work right, or ignore them and disable tests that expect them to do something. We've let this drag on a long time.

Show
Charles Oliver Nutter added a comment - 23/Oct/07 3:19 PM I think we need to take a stand on SAFE levels; make them work right, or ignore them and disable tests that expect them to do something. We've let this drag on a long time.
Hide
Permalink
John Mettraux added a comment - 23/Oct/07 5:52 PM

Things released here and based on JRuby rely on "SAFE levels don't exist in JRuby". Not expecting them anymore.

Show
John Mettraux added a comment - 23/Oct/07 5:52 PM Things released here and based on JRuby rely on "SAFE levels don't exist in JRuby". Not expecting them anymore.
Hide
Permalink
Charles Oliver Nutter added a comment - 15/Feb/08 12:58 PM

Punting issues from 1.1 RC2 to 1.1 final.

Show
Charles Oliver Nutter added a comment - 15/Feb/08 12:58 PM Punting issues from 1.1 RC2 to 1.1 final.
Hide
Permalink
Charles Oliver Nutter added a comment - 17/Mar/08 11:50 AM

I disabled safe levels completely for 1.1, since they blow up in horrible ways if you set them, and they wouldn't be accurate even if they were set. Now a warning is displayed and the safe level goes unchanged.

Show
Charles Oliver Nutter added a comment - 17/Mar/08 11:50 AM I disabled safe levels completely for 1.1, since they blow up in horrible ways if you set them, and they wouldn't be accurate even if they were set. Now a warning is displayed and the safe level goes unchanged.
Hide
Permalink
Charles Oliver Nutter added a comment - 17/Mar/08 11:51 AM

Post 1.1, if ever.

Show
Charles Oliver Nutter added a comment - 17/Mar/08 11:51 AM Post 1.1, if ever.
Hide
Permalink
Charles Oliver Nutter added a comment - 04/Feb/09 1:41 AM

JRuby does not and will not support SAFE levels, or at least won't support them the way MRI does. However this bug was reporting the freeze-up when going into $SAFE level 4, which now is essentially a no-op. So I'm marking resolved retrospectively, and if we ever decide to revisit SAFE we can open new bugs/enhancements.

Show
Charles Oliver Nutter added a comment - 04/Feb/09 1:41 AM JRuby does not and will not support SAFE levels, or at least won't support them the way MRI does. However this bug was reporting the freeze-up when going into $SAFE level 4, which now is essentially a no-op. So I'm marking resolved retrospectively, and if we ever decide to revisit SAFE we can open new bugs/enhancements.

People

  • Assignee:
    Charles Oliver Nutter
    Reporter:
    John Mettraux
Vote (0)
Watch (1)

Dates

  • Created:
    16/Apr/07 2:06 AM
    Updated:
    21/Mar/09 1:13 PM
    Resolved:
    04/Feb/09 1:41 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.