Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • M mu-impl-fast
  • Project information
    • Project information
    • Activity
    • Labels
    • Planning hierarchy
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 40
    • Issues 40
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 1
    • Merge requests 1
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar

WARNING! Access to this system is limited to authorised users only.
Unauthorised users may be subject to prosecution.
Unauthorised access to this system is a criminal offence under Australian law (Federal Crimes Act 1914 Part VIA)
It is a criminal offence to:
(1) Obtain access to data without authority. -Penalty 2 years imprisonment.
(2) Damage, delete, alter or insert data without authority. -Penalty 10 years imprisonment.
User activity is monitored and recorded. Anyone using this system expressly consents to such monitoring and recording.

To protect your data, the CISO officer has suggested users to enable 2FA as soon as possible.
Currently 2.7% of users enabled 2FA.

  • mu
  • mu-impl-fast
  • Issues
  • #55

Closed
Open
Created Jul 07, 2017 by Isaac Gariano@igariano01Maintainer

Cannot drop a lock in `throw_exception_internal`

In my latest commit, I have modified the structure of the exception table (so that it dosn't use unsafe pointers, and in order to fix Issue #53 (closed) ). In throw_exception_internal I acquire a read lock the compiled_callsite_table, we wan't this lock to be realesed before calling exception_restore, however the borrow checker won't let me:

error[E0505]: cannot move out of `compiled_callsite_table` because it is borrowed
  --> src/runtime/exception.rs:89:18
   |
65 |             let table_entry = compiled_callsite_table.get(&callsite);
   |                               ----------------------- borrow of `compiled_callsite_table` occurs here
...
89 |             drop(compiled_callsite_table); // drop the lock first
   |                  ^^^^^^^^^^^^^^^^^^^^^^^ move out of `compiled_callsite_table` occurs here

So I have commented out line 89, and things seam to work. The function exception_restore is marked as non-returning, so perhaps the rust compiler is smart enough to do the drop for us, if it isn't, we will get a deadlock if someone tries to acquire a write lock once an exception has been thrown (however currently we only modify the table once at startup, before any exceptions are thrown, so this won't occur).

Assignee
Assign to
Time tracking