x******a 发帖数: 6336 | 1 请问这个mergesort有什么问题?编译时没问题, 执行时提示Segmentation fault 11
多谢。
#include
using namespace std;
void merge(int a[], int const left, int const mid, int const right)
{
int* b=new int[right-left];
int h,i,j,k;
h=left;
i=0;
j=mid;
//merges the two array's into b[] till the first is finished
while((h
{
if(a[h]<=a[j])
{
b[i]=a[h];
h++;
}
else
{
b[i]=a[j];
j++;
}
i++;
}
//completes the array filling i... 阅读全帖 |
|
z********i 发帖数: 568 | 2 typo.原文已修改。就是这样,还有segmentation fault. |
|
b*******s 发帖数: 5216 | 3 楼主,segment fault一般就是两个原因导致的,一个是指针瞎指,一个是地址没有对
齐,你从这两个方面入手,基本常见的都会找到原因 |
|
m*********t 发帖数: 527 | 4 显然有好处:
不用自己分配内存出现 seg fault
效率上来说不会比自己写的差。
另外,这种基本功能 stl algorithm 全都有了。 |
|
z********i 发帖数: 568 | 5 个人观点,没有测试。
1. isblank returns true for both blank and tab.
2. for "const char *source", source can be modifed. So no need of "const
char *s".
3. since source_len is given, "while(*s++)" is not good, may have
segmentation fault if the parameters are not correct.
4. the way of memory allocation(double at each reallocation) is not space
efficient.
5. "used" is never increased in the loop.
知道memcpy,常常想不起来用它。见这程序用了,所以觉得有意思。 |
|
w*s 发帖数: 7227 | 6 Hi everyone,
i'm lost on this one, can someone give me some hints ?
1. downloaded latest stunnel package from web
2. build in the host linux and runs fine
3. build for arm target (am using the same settings from before,
my task is to upgrade to latest stunnel)
4. builds ok, when run in arm board, seg fault.
5. from gdb core,
[New LWP 867]
Cannot access memory at address 0x70797263
(gdb) bt
#0 parse_commandline (name=0xbefdce29 "/opt/ultra/config/stunnel.conf",
parameter=0xbefdce48 "-version") at... 阅读全帖 |
|
z****e 发帖数: 54598 | 7 无意中看到的
Date
June 20, 2013 - 10:52AM
14 reading nowComments 1 Read laterSee more stories on:
Central Intelligence Agency IBM Government Accountability Office Amazon
Pin Itsubmit to redditEmail articlePrintReprints & permissions
Ads by Google
Self Managed Super Fundwww.esuperfund.com.au
Learn The Advantages of SMSF With Australia's Biggest SMSF Provider!
The CIA chose Amazon's cloud over IBM's. Photo: Karl Hilzinger
WASHINGTON: The CIA selected Amazon over IBM to build a cloud computing
service... 阅读全帖 |
|
t*******y 发帖数: 1289 | 8 按照道理,还是会有seg fault的,只是你这次没有碰到。 |
|
g*****n 发帖数: 1 | 9 Help!!!
whenever the user or even root try to use lp and its related commands,
the output is always segmentation fault.
Any suggestion to resolve this issue would be greatly appreciated |
|
l****p 发帖数: 12 | 10 I wrote a PS/SQL file (.pc), which runs ok on Unix. however,
when I tried
to use script command to output all the steps into a file,
it generated
a "segmentation fault". I am wondering is this because the
program uses the
local stack allocated by script which is too small?
thanks in advance. |
|
p*****m 发帖数: 31 | 11 【 以下文字转载自 Linux 讨论区 】
【 原文由 problem 所发表 】
如题,我们的程序是用标准C写的.
在sun/hp/alpha上都没有问题,但是在linux上编译后
运行某一case时会在调用malloc时死掉.
有关信息是:
Program received signal SIGSEGV, Segmentation fault.
0x400b8929 in chunk_free (ar_ptr=0x40156c00, p=0xb7c09274) at malloc.c:3115
不知哪位大狭能提供帮助?
其他平台上用的都不是gcc,
linux上用的是gcc2.95-2,
os 为 redhat 7.0
(2.2.16-22 )
我怀疑是不是编译时结构变量是否要双字对齐或者类似的问题,
还是linux os的问
因为在sun下作过purify,没有内存问题
br /> |
|
l******o 发帖数: 18 | 12 编译程序通过,但是运行的时候出现如题错误
我用dbx debug, 结果说 signal SEGV (no mapping at the fault address) in fscanf
at XXXX
出错的一行是个很简单的读入语句 fscanf(velfp, "%d", &npt);
实在不知道什么意思
还有,我的这个程序是对每个事件分网格计算,当把网格分的很大的时候,整个程序运行没
问题
分的小一点就在中间出错. 可是出错之前,又已经有事件计算完毕了. 对每个事件不过循
环
而已,参数有些改变
实在找不出哪儿的错,郁闷 |
|
s*j 发帖数: 7 | 13 在xp下装了一个Cygwin,用gdb debug一个小例子程序,设了断点后,就出现了上面的错
误。。Program received signal SIGSEGV, Segmentation fault. 这个程序拿到其他装
Cynwin的机子上debug,没有什么问题。
google了一下这个问题,看到说 You need to simplefy your PATH. The main probl
em you're having is that you're
mixing UNIX TOOL PACKAGES. 建议add `export
PATH=/bin:/usr/bin:/usr/local/bin:/what/ever/other/paths:." to your ~/.bashr
c file。加了以后,好像还是不行。
请指点一下。谢谢。 |
|
P*******g 发帖数: 215 | 14 segmentation fault一出,我一个礼拜心情都不会好 |
|
M**********o 发帖数: 203 | 15 最近在查一些文献,有人知道谁是fault diagnosis(故障诊断)方面的大牛?Thank you
in advance。 |
|
s***f 发帖数: 226 | 16 这些concepts适用于build任何reliable systems,不仅仅适用于硬件也适用软件。
large scale distributed server farms也需要Fault tolerance,redundancy等等。 |
|
|
|
|
R*s 发帖数: 2041 | 20 【 以下文字转载自 NCAA 讨论区 】
发信人: atuan (阿团), 信区: NCAA
标 题: Re: One Coach K's fault
发信站: BBS 未名空间站 (Thu Mar 15 23:30:53 2007)
后俩很熟,giants跟clonist不知道。。。 |
|
j***h 发帖数: 4412 | 21 (Wed Jul 30 22:34:23 2008)
最后,预测一下the Big One的epicenter, 想必是去年(10/30/07)的Magnitude 5.4
event near Alum Rock处无疑,因为this event (/30/07 Magnitude 5.4 event near
Alum Rock),将弯曲最危险的Hayward fault (现在处于150年的窗口期)与另一条大
致沿I-680走向的Calaveras fault连在一起。不过,南湾鬼谷的同学大可放心,大部分
鬼谷的office buildings都不太高,且不少是1995年后建造的。再加上大部分鬼谷的
single family houses也是1995年后建造的,均符合1995年发布的新抗震规范的要求。
只是在最危险的是三藩及Oakland的Downtown的high-rise office buildings上班的各
位,小心驶得万年船,take care.
========================================================
Eart... 阅读全帖 |
|
A**d 发帖数: 13310 | 22 http://www.dailymail.co.uk/news/article-4880156/PIERS-MORGAN-happened-Hillary-loser.html
We all know what happened, Hillary: you're a loser! Now get over it and give
the rest of us a break
...
Readers are left in absolutely no doubt who's to blame, and it's most
definitely NOT Hillary Rodham Clinton.
Oh no, she's absolutely the last name on the list of culprits for the most
humiliating beat-down in US political history.
The list of people and entities that Hillary DOES blame is so long, it's
fra... 阅读全帖 |
|
j**********r 发帖数: 3798 | 23 本来是生死有命,富贵在天的事情。你就喜欢被打脸,没办法。San Andrea离
Cupertino还算有点距离,Hayward fault可是贯穿Fremont. 你看看人专业的怎么说。
http://www.earthmagazine.org/article/most-dangerous-fault-america
Most people have heard of the San Andreas, which they assume will be the
source of the next big quake in the Bay Area, thanks in part to Hollywood
disaster movies, such as the dreadful “San Andreas,” which perpetuate
geologic absurdities. Despite the notoriety of the San Andreas Fault, it is
not the greatest seismic threat to the Bay Area... 阅读全帖 |
|
a**********2 发帖数: 3726 | 24 都是别人的错,唯有自己是对的。It's Obama's fault, Comey's fault, Russia's
fault, now media's fault. It's the deplorable's fault, unredeemable's fault.
It's not Clinton foundation's fault, not lie for Benghazi's fault, not
Clinton body bag's fault, not lie under oath's fault, not email server & it'
s lie's fault, not "tax the middle class"'s fault, not George Soros donation
's fault, etc. |
|
o**********n 发帖数: 367 | 25 http://www.earthquakesafety.com/whyretrofit/earthquake_history.
Earthquake History of the Bay Area
1836 M 6.8
South San Francisco Bay Region
1838 M 7 San Andreas fault
San Francisco Peninsula
1865 M 6.5 San Andreas fault
1868 M 7 Hayward fault zone
Hayward Earthquake
1892 M 6.5 Undetermined fault
Vacaville Earthquake
1898 M 6.5 Rogers Creek fault
Mare Island Earthquake
1906 M 7.8 San Andreas fault
Great San Francisco Earthquake
1911 M 6.5 Calaveras fault
Morgan Hi... 阅读全帖 |
|
a**s 发帖数: 9606 | 26 惨不忍睹啊, 全部都是UE.
asus - chipncharge
3-6 7-5 0-2
Played on 05/08/2011
SERVICE
Total services: 75 - 76
% 1st service: 68% - 51%
Aces: 1 - 4
1st services in: 50 - 35
2nd services in: 23 - 26
Double faults: 1 - 11
POINTS
Total points won: 71 - 80
Winners: 13 - 13
Unforced errors: 32 - 34
Unreturned services: 24 - 14
Forced errors: 35 - 24
CONVERSION
1st service pts won: 53% - 69%
2nd service pts won: 57% - 69%
Receiving pts won: 41% - 47%
Net points: 6/9 - 3/12
Break points: 3/11 - 5/12
WON RALLIES
Av... 阅读全帖 |
|
h*******9 发帖数: 807 | 27 No-Fault States: Because the tort (lawsuit) system has led to long and
costly court battles over who was at fault and to what degree, policymakers
in many states decided to change from a fault-based system to some form of a
no-fault system.
Under no-fault automobile insurance laws, the good driver does not have to
prove that the crash was somebody else’s fault before getting his money.
His insurance company picks up medical bills, rehabilitation costs and lost
wages up to the amount he purchased... 阅读全帖 |
|
t*******a 发帖数: 51 | 28 P0100 Mass or Volume Air Flow Circuit Malfunction
P0101 Mass or Volume Air Flow Circuit Range/Performance Problem
P0102 Mass or Volume Air Flow Circuit Low Input
P0103 Mass or Volume Air Flow Circuit High Input
P0104 Mass or Volume Air Flow Circuit Intermittent
P0105 Manifold Absolute Pressure/Barometric Pressure Circuit Malfunction
P0106 Manifold Absolute Pressure/Barometric Pressure Circuit Range/
Performance Problem
P0107 Manifold Absolute Pressure/Barometric Pressure Circuit Low Input
P0108 ... 阅读全帖 |
|
d*********6 发帖数: 1972 | 29 当初办保险的时候就是客服给推荐了啥项目就开了啥项目
现在想回头看看有木有啥问题 请教牛人
Bodily Injury Liability 我理解是我at fault时赔别人医疗
Property Damage Liability 应该是我at fault时赔别人车
这两个都是强制的 我都选了上限liability
Medical Payments和Basic Personal Injury Protection
当时就听了客服的没选,它们有啥区别?
这个是我at fault时候,还是别人at fault时有效?
和自己的医疗保险是不是重合了?
Underinsured Motorist和Underinsured Motorist Property Damage
我理解就是对方at fault;且对方没有保险、或者hit and run的时候赔我
(而且没有deduction)
这两个都选了
Comprehensive我理解就是非人为错误造成的车的伤害,没有人at fault时赔车
Collision我理解就是我at fault的时候赔我自己的车
这两个我都选了500 deductibl... 阅读全帖 |
|
a******e 发帖数: 138 | 30 刚看了一下,佛州是"no fault" state,无论事故责任在谁,都只能找自己的保险公司
负责赔偿。责任方只是涨保费。你的case是,双方保险是同一个公司,geico应该已经
赔了老黑,现在是试图从你这里得到补偿,找个律师咨询一下吧。下面是关于no fault
state 的一些信息,希望有用:
In its broadest sense, "no-fault insurance" is a term used to describe any
type of insurance contract under which insureds are indemnified for losses
by their own insurance company, regardless of fault in the incident
generating losses. In this sense, it is no different from first-party
coverage. However, the term no-fault is most commonly used in... 阅读全帖 |
|
d**********o 发帖数: 1321 | 31 最终版本的compiler测试结果
=================================================
Output of Building User Code
Explode the tar
c-.l
c-.y
scanType.h
makefile
symtab.h
symtab.cpp
emitCode.h
emitCode.cpp
20131214164956-huang-CS445-F13-A5.tar: POSIX tar archive (GNU)
Tests: directory
c-.l: lex description text
c-.y: lex description text
emitCode.cpp: ASCII C++ program text
emitCode.h: ... 阅读全帖 |
|
d**********o 发帖数: 1321 | 32 最终版本的compiler测试结果
=================================================
Output of Building User Code
Explode the tar
c-.l
c-.y
scanType.h
makefile
symtab.h
symtab.cpp
emitCode.h
emitCode.cpp
20131214164956-huang-CS445-F13-A5.tar: POSIX tar archive (GNU)
Tests: directory
c-.l: lex description text
c-.y: lex description text
emitCode.cpp: ASCII C++ program text
emitCode.h: ... 阅读全帖 |
|
d**w 发帖数: 2474 | 33 What happens if you are in an accident and one party has insurance and the
other does not? Who pays?
First, it is important to note that the party who has insurance may not
necessarily be the party who was at fault for the accident. It is the at-
fault party who is responsible for paying for the damages of the party who
was not at fault. This is true whether or not the at-fault party has
insurance. Here is an example, and let’s say we are in a state where there
is a fault-based insurance schem... 阅读全帖 |
|
c*********0 发帖数: 1676 | 34 在网上搜到一个关于保险,理赔等方面的faq,虽然是Minnesota 的,但应该大多数州在
这方面的定义应该相差无几。在这转载一下,应该对大家急需的时候有所帮助。
FAQ
Can I take my car to the repair shop of my choice?
You have the legal right to choose a repair shop to fix your vehicle. When
reporting your claim, immediately let your insurer know which shop you’d
like to repair your vehicle. Your insurer should not attempt to influence
your decision regarding where to have your vehicle repaired and is obligated
to cover the reasonable costs of repairing your vehicle to its p... 阅读全帖 |
|
L**P 发帖数: 3792 | 35 如果在加州,有这些网站可以查
http://www.redtreesoft.com/Google/
http://www.quake.ca.gov/gmaps/FAM/faultactivitymap.html
http://geohazards.usgs.gov/qfaults/ca/California.php
这几个最容易用
http://earthquake.usgs.gov/regional/nca/bayarea/apfaults.php
http://nationalatlas.gov/mapmaker?AppCmd=CUSTOM&LayerList=qfaul
看了一个山上的房子,风景很好,学区很好,floor plan也很好,价钱合理, 但是在一条
potentially active的fault附近,幸运是不在active的附近,在landslide危险区,开始
很犹豫,现在觉得无所谓了
首先要搞清几个个概念
地震断层 fault 一条线
地震断层区 fault zone,就是fault为中线的区域
地震危险区, seismic harzard zone, 地震危险... 阅读全帖 |
|
n***c 发帖数: 25 | 36 Please read this:
http://seattle.about.com/od/localgovernment/a/Is-Seattle-Ready-
"Scientists believe this tectonic fault is capable of creating extremely
large earthquakes, topping 9.0 on the Richter scale, and that there is about
a 40% chance of such a mega-quake happening in the next 50 years. At the
moment there is no way to predict the timing of such a quake, just that one
is extremely likely. And because the fault is off-shore, a Cascadia mega-
quake stands a strong chance of generating a ... 阅读全帖 |
|
d**********i 发帖数: 365 | 37 可以这样理解,NOT land in the receiver’s service court 可以看做是一个fault
,属于发球方的fault (1),而碰触对方身体,又是一个fault (2),属于接球方的
fault。两个fault中只有先出现的fault成立。所以,球没落地就碰对方身体,即使假
设按正常轨迹此球出界,但fault(2)在前,发球方得分;如果球落地再弹到身体,
fault(1)在前,接球方得分。同样,触网的判定也类似,网前扑球,如果球先落地拍子
再触网,应该判定得分,反之,则是扑球方的fault,失分。
pass
s |
|
g*****y 发帖数: 7271 | 38 上周日正好看见曾搭讪过我的牛人的比赛,偷录了一个set。
好像是白衣6:0蓝衣。
蓝衣人我没有任何信息,看起来2,30岁的样子。最近见到好几次他跟
白衣练球和打比赛。练球时看起来底线不错,不过好像发球较弱,比赛
总是输得甚惨,基本hold不住,也break不了白衣。
白衣人,据说10岁开始练球,东方式正手,球很平,技术很全面,发球
很不错。岁数看着不小,但是具体不详,也可能只是显老。有三个男孩,
最大的小孩8,9岁。打上3个set好像没见体力问题。
贴一个他们的比赛录像,偷拍的角度不好,大家将就。我在边上练发球,
所以噪声比较多。(另:上载400M好慢啊,大家给点包子慰劳慰劳吧?)
http://www.youtube.com/watch?v=BRdLLhiLako
请各位鉴定鉴定两人的NTRP吧。以后有空再谈一谈白衣人跟我搭讪打球
的过程吧。
花时间输入到tennis math里了,这是统计数据:
白衣(luke) - 黑衣(noname)
6-0
SERVICE
Total services: 24 - 21
% 1st service: 54% - 41%
Aces:... 阅读全帖 |
|
g*****y 发帖数: 7271 | 39 花时间输入到tennis math里了,这是统计数据:
白衣 - 黑衣
6-0
SERVICE
Total services: 24 - 21
% 1st service: 54% - 41%
Aces: 0 - 1
1st services in: 13 - 7
2nd services in: 8 - 8
Double faults: 3 - 5
POINTS
Total points won: 29 - 17
Winners: 0 - 3
Unforced errors: 7 - 10
Unreturned services: 4 - 11
Forced errors: 7 - 19
CONVERSION
1st service pts won: 69% - 67%
2nd service pts won: 75% - 25%
Receiving pts won: 64% - 37%
Net points: 1/3 - 1/4
Break points: 3/7 - 0/3
WON R... 阅读全帖 |
|
j***h 发帖数: 4412 | 40 Earthquake detection systems can sound the alarm in the moments before a
big tremor strikes—time enough to save lives
Japan’s system, which went live in 2007, makes heavy use of personal
technology. Alerts go out not only on television and radio but through
special receivers in homes, offices and schools. Pop-up windows on
computers show a real-time map with the epicenter’s location and the
radiating seismic waves. A timer counts down to the shaking at your
location and highlights predicted inte... 阅读全帖 |
|
j***h 发帖数: 4412 | 41 Earthquake detection systems can sound the alarm in the moments before a
big tremor strikes—time enough to save lives
Japan’s system, which went live in 2007, makes heavy use of personal
technology. Alerts go out not only on television and radio but through
special receivers in homes, offices and schools. Pop-up windows on
computers show a real-time map with the epicenter’s location and the
radiating seismic waves. A timer counts down to the shaking at your
location and highlights predicted inte... 阅读全帖 |
|
p***e 发帖数: 1318 | 42 东南湾主要两座山脉. 南湾是有名的santa cruz mountains. 南望郁郁葱葱的就是了.
东湾是east bay hills, 东望童山秃秃者是也. santa cruz mountains 大该高三千多
尺, 西北东南走向. east bay hills, 大该高二千多尺, 南北走向, 把east bay分成近
东 (fremont side), 和远东(pleasanton side). santa cruz mountains 地处san
andreas fault. east bay hills 地处hayward fault. hayward fault以东还有一系列
, calaveras fault, concord green valley fault, greenville fault, mountain
diablo thrust fault. 在众多fault 之中座落着BBS地产新贵pleasanton. 不过研究资
料表明, 这一带土壤以膨胀性粘土为多, 地震时liquefaction危险性较小, 然而这种粘
土吸水膨胀, 是造成地基裂缝一大隐患. |
|
j***h 发帖数: 4412 | 43 Earthquake detection systems can sound the alarm in the moments before a
big tremor strikes—time enough to save lives
Japan’s system, which went live in 2007, makes heavy use of personal
technology. Alerts go out not only on television and radio but through
special receivers in homes, offices and schools. Pop-up windows on
computers show a real-time map with the epicenter’s location and the
radiating seismic waves. A timer counts down to the shaking at your
location and highlights predicted inte... 阅读全帖 |
|
j***h 发帖数: 4412 | 44 Earthquake detection systems can sound the alarm in the moments before a
big tremor strikes—time enough to save lives
Japan’s system, which went live in 2007, makes heavy use of personal
technology. Alerts go out not only on television and radio but through
special receivers in homes, offices and schools. Pop-up windows on
computers show a real-time map with the epicenter’s location and the
radiating seismic waves. A timer counts down to the shaking at your
location and highlights predicted inte... 阅读全帖 |
|
c***r 发帖数: 4631 | 45 不知道这样的东西算书么, 1772 BCE的样子。刻的内容如下:
CODE OF LAWS
1. If any one ensnare another, putting a ban upon him, but he can not prove
it, then he that ensnared him shall be put to death.
2. If any one bring an accusation against a man, and the accused go to the
river and leap into the river, if he sink in the river his accuser shall
take possession of his house. But if the river prove that the accused is not
guilty, and he escape unhurt, then he who had brought the accusation shall
be put to death, while he... 阅读全帖 |
|
G*******9 发帖数: 4371 | 46 你这个就是在钻牛角尖了。
http://www.autoinsuranceweb.com/no-fault.html
这个网页里面明确说:
Arkansas, Delaware, Washington, DC, Maryland, New Hampshire, Oregon, South
Dakota, Texas, Virginia, Washington, and Wisconsin are considered "add-on"
states because they require insurance policy coverage that offer elements of
the no-fault system which the true no-fault states feature.
也就是说,虽然Oregon不是法律体系完全是No-fault的,但是它的汽车保险要求必须有
No-fault州才规定必须的东西。也就是说,单从汽车保险的角度看,这是我发帖的中心
内容,它是No-fault的。
以下是另一个网站的相关内容,和我用汉语说的一样。
http://www.ca... 阅读全帖 |
|
e********r 发帖数: 712 | 47 那就是你说的对么
我还看什么呢
你说的事实no fault么
虽然我也看到了这个
Some states have no-fault provisions in their car insurance policies but are
not considered true no-fault states, according to III. For example, Oregon
mandates auto insurance companies provide personal injury protection to pay
for "injuries resulting from the use, maintenance, or ownership of an
automobile."
However, the state allows a not-at-fault accident victim to sue (without
restrictions) the at-fault driver for pain-and-suffering and disability
dam... 阅读全帖 |
|
z***x 发帖数: 851 | 48 来自主题: Collectibles版 - 菜鸟请教2 邮票图案不在中间,切的时候off center,两边margin 不一样。 这几张都是。美国早
期邮票这样的很多,
copied from some website:
Grade is about centering, cancels and gum. Grade describes
how well the stamp's design is centered between the
perforations*, both horizontally and vertically, on the paper,
and the condition of the gum for mint stamps, or the effect of
the cancellation on used stamps. (*or margins in the case of
imperforates)
Grades are meted out like school exam scores: "superb" all
the way down to "poor," but an adequate descr... 阅读全帖 |
|
s******a 发帖数: 472 | 49 illustrator不能保存成ai,pdf等格式;唯一可以保存的格式是fxg
特点是在家不能保存,在研究所里可以。
谢谢!
Log Name: Application
Source: Application Error
Date: 2012/5/26 21:03:23
Event ID: 1000
Task Category: (100)
Level: Error
Keywords: Classic
User: N/A
Computer: yanyan-THINK
Description:
Faulting application name: Illustrator.exe, version: 15.0.0.399, time stamp:
0x4bad3bbf
Faulting module name: AGM.dll, version: 4.20.68.7602, time stamp: 0x4b980061
Exception code: 0xc0000005
Fault ... 阅读全帖 |
|