qiyitang71 / jpf-visual

JPF Visual
1 stars 1 forks source link

Lock release (monitorexit) not shown #27

Closed qiyitang71 closed 7 years ago

qiyitang71 commented 7 years ago

Original report by Artho Cyrille (Bitbucket: 557058:d037361a-d6a1-4cae-80e0-7b1940bbc779, GitHub: cyrille-artho).


Even though the source code for releasing a lock is often just a closing brace ("}") or nothing in the case of synchronized methods, these events should be highlighted in the same way as lock acquisitions.

For example: transition 193 in the error trace of the chat server shows (on the console):

#!python

  ChatServer.java:48             : synchronized(chatServer) {
  ChatServer.java:49             : idx = chatServer.n;
  ChatServer.java:50             : }

Line 50 is suppressed by the current heuristic for not showing events without source code; however, this corresponds to a lock release and should definitely be shown.

For synchronized methods, the "monitorexit" event should correspond to the end of the method.

qiyitang71 commented 7 years ago

Original comment by Artho Cyrille (Bitbucket: 557058:d037361a-d6a1-4cae-80e0-7b1940bbc779, GitHub: cyrille-artho).


Works now.