Skip to content
Snippets Groups Projects
Commit c3ad1e31 authored by Anthony Mallet's avatar Anthony Mallet
Browse files

[wip/genom3-ros] Workaround a (complex) bug in tcl-8.6.0

Bump PKGREVISION
parent d7595f7c
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,7 @@
# Created: Anthony Mallet on Fri, 19 Oct 2012
#
PKGREVISION= 1
DISTNAME= genom3-ros-1.10
CATEGORIES= architecture
MASTER_SITES= ${MASTER_SITE_OPENROBOTS:=genom3-ros/}
......
SHA1 (genom3-ros-1.10.tar.gz) = 413014351c46f50d57b4c859d4ff0c3300d1c404
RMD160 (genom3-ros-1.10.tar.gz) = 0cc9eaf2bfb449d9be9e7657a202af65160c857d
Size (genom3-ros-1.10.tar.gz) = 390003 bytes
SHA1 (patch-aa) = 85cae81cae4dcda2f42c971561498522a3dba456
From 8c2c0b2061a04a8d2e2dbb279e44a60828ba881a Mon Sep 17 00:00:00 2001
From: Anthony Mallet <anthony.mallet@laas.fr>
Date: Wed, 6 May 2015 11:14:11 +0200
Subject: [PATCH] Workaround a strange bug in tcl-8.6.0
It looks like using expr { int([$object proc]) } in the context of a genom
template triggers a bug (NULL pointer dereference) when tcl tries to get the
current line number (requested by the genom template parser).
It happens that using the equvalent tcl::mathfunc::int procedure does not
trigger this issue, so use that instead.
---
server/control-task.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git server/control-task.cc server/control-task.cc
index 22b36e4..94e057b 100644
--- server/control-task.cc
+++ server/control-task.cc
@@ -272,9 +272,9 @@ genom_component_data::timercb(const ros::TimerEvent &e)
<' foreach task [$component tasks] {'>
<' if {![catch {$task period} period]} {'>
<'
- set ticks [expr {int([$period value]/[$rate value])}]
+ set ticks [tcl::mathfunc::int [expr {[$period value]/[$rate value]}]]
if {![catch {$task delay} delay]} {
- set d [expr {int([$delay value]/[$rate value])}]
+ set d [tcl::mathfunc::int [expr {[$delay value]/[$rate value]}]]
} else {
set d 0
}
--
1.9.1
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment