[Wesnoth-bugs] [bug #25080] UB in map resize window

2017-03-18 Thread Charles Dang
Update of bug #25080 (project wesnoth):

 Open/Closed:Open => Closed 


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Wesnoth-bugs mailing list
Wesnoth-bugs@gna.org
https://mail.gna.org/listinfo/wesnoth-bugs


[Wesnoth-bugs] [bug #25080] UB in map resize window

2017-03-13 Thread Daniel
Update of bug #25080 (project wesnoth):

  Status:None => Fixed  


___

Reply to this item at:

  

___
  Nachricht gesendet von/durch Gna!
  http://gna.org/


___
Wesnoth-bugs mailing list
Wesnoth-bugs@gna.org
https://mail.gna.org/listinfo/wesnoth-bugs


[Wesnoth-bugs] [bug #25080] UB in map resize window

2017-03-13 Thread Daniel
Follow-up Comment #8, bug #25080 (project wesnoth):

was fixed some time ago 
https://github.com/wesnoth/wesnoth/commit/24e7ae28d80d589e5156910f1ba2df765fc7ca8d

___

Reply to this item at:

  

___
  Nachricht gesendet von/durch Gna!
  http://gna.org/


___
Wesnoth-bugs mailing list
Wesnoth-bugs@gna.org
https://mail.gna.org/listinfo/wesnoth-bugs


[Wesnoth-bugs] [bug #25080] UB in map resize window

2016-10-24 Thread Wedge009
Follow-up Comment #7, bug #25080 (project wesnoth):

I know that, I was speaking generally.

Also, my point was that it was a different situation to the report I mentioned
previously. Not really sure what you're trying to say with all your typing
errors anyway.

Regardless, in this case, it does look like the expand direction member needs
to be a reference.

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Wesnoth-bugs mailing list
Wesnoth-bugs@gna.org
https://mail.gna.org/listinfo/wesnoth-bugs


[Wesnoth-bugs] [bug #25080] UB in map resize window

2016-10-24 Thread Daniel
Follow-up Comment #6, bug #25080 (project wesnoth):

This is actuall nothing related to c++11/14/17 features.

> But in this case expand_direction_ is a private member of the
teditor_resize_map class.

This is provate doesn tmant that the actual pbject is points to is also a
member of the teditor_resize_map  class.

>  Is it really necessary or helpful to have it as a reference?

Wll you can locally try to change to be a value, butmy guess is that the map
resizing in the esitor just won't work then.

___

Reply to this item at:

  

___
  Nachricht gesendet von/durch Gna!
  http://gna.org/


___
Wesnoth-bugs mailing list
Wesnoth-bugs@gna.org
https://mail.gna.org/listinfo/wesnoth-bugs


[Wesnoth-bugs] [bug #25080] UB in map resize window

2016-10-23 Thread Wedge009
Follow-up Comment #5, bug #25080 (project wesnoth):

Hmm, it's been a while since I've really worked in-depth in C/C++. I recall
the stuff about passing by reference when you're dealing with function
parameters. But in this case expand_direction_ is a private member of the
teditor_resize_map class. Is it really necessary or helpful to have it as a
reference? I recall another bug where you suggested that the member reference
needed to be changed to just a reference value - and that worked. Don't recall
what bug report that was, though.

I know C++ has advanced a lot since I worked with it in the early 2000s
(C++11/14/etc), I feel like such a newbie again!

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Wesnoth-bugs mailing list
Wesnoth-bugs@gna.org
https://mail.gna.org/listinfo/wesnoth-bugs


[Wesnoth-bugs] [bug #25080] UB in map resize window

2016-10-23 Thread Daniel
Follow-up Comment #4, bug #25080 (project wesnoth):

expand_direction_ is like an output paramter of that dialog, like when you
pass a pointer as a parameter to a function, but actually the function ignores
the value of that parameter and just write it so tzhat the caller can use it.

___

Reply to this item at:

  

___
  Nachricht gesendet von/durch Gna!
  http://gna.org/


___
Wesnoth-bugs mailing list
Wesnoth-bugs@gna.org
https://mail.gna.org/listinfo/wesnoth-bugs


[Wesnoth-bugs] [bug #25080] UB in map resize window

2016-10-20 Thread Wedge009
Follow-up Comment #3, bug #25080 (project wesnoth):

I was wondering about that. expand_direction_ is defined as a
EXPAND_DIRECTION& and I'm not quite sure what the intention was behind that.

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Wesnoth-bugs mailing list
Wesnoth-bugs@gna.org
https://mail.gna.org/listinfo/wesnoth-bugs


[Wesnoth-bugs] [bug #25080] UB in map resize window

2016-10-20 Thread Daniel
Follow-up Comment #2, bug #25080 (project wesnoth):

Line 162 that is meantioned in the log points to "&&
static_cast(expand_direction_) != i" so it'S likeley that error is that
expand_direction_ is not a valid EXPAND_DIRECTION.

___

Reply to this item at:

  

___
  Nachricht gesendet von/durch Gna!
  http://gna.org/


___
Wesnoth-bugs mailing list
Wesnoth-bugs@gna.org
https://mail.gna.org/listinfo/wesnoth-bugs


[Wesnoth-bugs] [bug #25080] UB in map resize window

2016-10-20 Thread Wedge009
Update of bug #25080 (project wesnoth):

 Release: git => 1.13.5+dev 

___

Follow-up Comment #1:

The code hasn't changed since this was first reported:


for(int i = 0; i < 9; ++i) {
if(direction_buttons_[i]->get_value()
   && static_cast(expand_direction_) != i) {
expand_direction_ = static_cast(i);
break;
}
}


Within the loop, i should only ever be 0 to 8 inclusive. EXPAND_DIRECTION is
an enumeration defined as integers from 0 to 8 inclusive. So I'm really
curious as to how i became 11273260 when it's cast to EXPAND_DIRECTION. :S

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Wesnoth-bugs mailing list
Wesnoth-bugs@gna.org
https://mail.gna.org/listinfo/wesnoth-bugs


[Wesnoth-bugs] [bug #25080] UB in map resize window

2016-09-19 Thread Matthias Krüger
URL:
  

 Summary: UB in map resize window
 Project: Battle for Wesnoth
Submitted by: matthiaskrgr
Submitted on: Mon 19 Sep 2016 01:53:14 PM UTC
Category: Bug
Severity: 3 - Normal
Priority: 5 - Normal
  Item Group: Editor
  Status: None
 Privacy: Public
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Discussion Lock: Any
 Release: git
Operating System: linux

___

Details:

There is some UB that shows up when the map resize window of the editor is
shown.

log attached

@ 8508b42-Clean



___

File Attachments:


---
Date: Mon 19 Sep 2016 01:53:14 PM UTC  Name: UB_editor_resize_map.log  Size:
4kB   By: matthiaskrgr



___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Wesnoth-bugs mailing list
Wesnoth-bugs@gna.org
https://mail.gna.org/listinfo/wesnoth-bugs